My Favorites

Close

Please to see your favorites.


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 NetIQ/Novell/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-13
  • Modified Date:20-JUN-13
    • SUSESUSE Manager

Did this document solve your problem? Provide Feedback