spacewalk-clone-by-date fails with error "AttributeError: type object 'datetime.datetime' has no attribute 'strptime'"
Issue
-
On Red Hat Satellite 5.6
spacewalk-clone-by-datefails when using configuration file.
For example:# cat clone-03Nov15.cfg { "assumeyes":true, "to_date": "2015-11-03", "skip_depsolve":false, "security_only":false, "blacklist": { }, "removelist": { }, "channels":[ { "rhel-x86_64-server-7": "rhel-x86_64-server-7_03Nov15" } ] }The
spacewalk-clone-by-datefails to clone channel.# spacewalk-clone-by-date --config="/path-to/clone-03Nov15.cfg" --username "admin" --password "password" Reading repository information. Using issue_date. By continuing the following will be cloned: rhel-x86_64-server-7 -> rhel-x86_64-server-7_03Nov15 (673/675 Errata) Copying repodata, please wait. Solving Dependencies (4311): ######################################## - complete Processing Dependencies: ########################################Traceback (most recent call last): File "/usr/bin/spacewalk-clone-by-date", line 253, in ? sys.exit(abs(main() or 0)) File "/usr/bin/spacewalk-clone-by-date", line 243, in main return cloneByDate.main(args) File "/usr/share/rhn/utils/cloneByDate.py", line 177, in main cloner.create_channels(options.skip_depsolve) File "/usr/share/rhn/utils/cloneByDate.py", line 302, in create_channels self.dep_solve(nvreas, labels=(to_create.keys() + [self.src_parent])) File "/usr/share/rhn/utils/cloneByDate.py", line 385, in dep_solve self.__dep_solve(nvrea_list) File "/usr/share/rhn/utils/cloneByDate.py", line 397, in __dep_solve self.process_deps(dep_results) File "/usr/share/rhn/utils/cloneByDate.py", line 429, in process_deps added_nevras = added_nevras + cloner.process_deps(needed) File "/usr/share/rhn/utils/cloneByDate.py", line 523, in process_deps if not self.to_date or (self.to_date and \ AttributeError: type object 'datetime.datetime' has no attribute 'strptime'
Environment
- Red Hat Satellite 5.6
- Red Hat Enterprise Linux 5
- spacewalk-utils-2.0.2-26.el5sat.noarch
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
