SUSE Support

Here When You Need Us

spacewalk-clone-by-date quits with AttributeError: 'NoneType' object has no attribute 'date'

This document (7012650) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager 1.7

Situation

spacewalk-clone-by-date exists with the following error:
susemanager-ncc:~ # spacewalk-clone-by-date -k -u admin -l sles11-sp1-pool-x86_64 sles11-sp1-pool-x86_64-TEST -l sles11-sp1-updates-x86_64 sles11-sp1-updates-x86_64-TEST
Password:
Reading repository information.

By continuing the following channels will be created:
sles11-sp1-updates-x86_64-TEST, sles11-sp1-pool-x86_64-TEST

Continue with channel creation (y/n)?y

Cloning sles11-sp1-pool-x86_64 to sles11-sp1-pool-x86_64-TEST with original package set.
Cloning sles11-sp1-updates-x86_64 to sles11-sp1-updates-x86_64-TEST with original package set.
Traceback (most recent call last):
  File "/usr/bin/spacewalk-clone-by-date", line 206, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/bin/spacewalk-clone-by-date", line 196, in main
    return cloneByDate.main(args)
  File "/usr/share/rhn/utils/cloneByDate.py", line 158, in main
    tree_cloner.prepare()
  File "/usr/share/rhn/utils/cloneByDate.py", line 297, in prepare
    cloner.prepare()           
  File "/usr/share/rhn/utils/cloneByDate.py", line 422, in prepare
    self.errata_to_clone, self.available_errata = self.get_errata()    
  File "/usr/share/rhn/utils/cloneByDate.py", line 506, in get_errata
    if err['issue_date'].date() <= self.to_date.date():
AttributeError: 'NoneType' object has no attribute 'date'

Resolution

The option -d <date> is missing in the command:
susemanager-ncc:~ # spacewalk-clone-by-date -k -u admin -l sles11-sp1-pool-x86_64 sles11-sp1-pool-x86_64-TEST -l sles11-sp1-updates-x86_64 sles11-sp1-updates-x86_64-TEST -d $(date +%Y-%m-%d)
Password:
Reading repository information.

By continuing the following will be cloned:
  sles11-sp1-pool-x86_64 -> sles11-sp1-pool-x86_64-TEST  (0/0 Errata)
  sles11-sp1-updates-x86_64 -> sles11-sp1-updates-x86_64-TEST  (826/826 Errata)

Continue with clone (y/n)?y

Cloning Errata into sles11-sp1-updates-x86_64-TEST (826):
________________________________________
######################################## - complete

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7012650
  • Creation Date: 20-Jun-2013
  • Modified Date:03-Mar-2020
    • SUSE Manager

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.