Bug 700122
| Summary: | Consumer List from pulp-admin fails on RHEL5 (date parsing issue) | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Todd Sanders <tsanders> |
| Component: | z_other | Assignee: | Jay Dobies <jason.dobies> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | unspecified | CC: | jason.dobies |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | Sprint 23 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 12:09:40 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 647488 | ||
|
Description
Todd Sanders
2011-04-27 14:15:16 UTC
<jortel> alcy: when you get a chance, I believe this: http://www.fpaste.org/n8dI/ is the patch you need. 1. diff --git a/src/pulp/client/json_utils.py b/src/pulp/client/json_utils.py 2. index 1b7af72..e5d8782 100644 3. --- a/src/pulp/client/json_utils.py 4. +++ b/src/pulp/client/json_utils.py 5. @@ -17,6 +17,7 @@ 6. Utilities for parsing and formatting of JSON values. 7. ''' 8. 9. +import time 10. from datetime import datetime 11. 12. ISOFORMAT = '%Y-%m-%dT%H:%M:%S' 13. @@ -45,4 +46,4 @@ def parse_iso_date(iso_str): 14. @return: python object representing the date 15. @rtype: L{datetime.datetime} instance 16. """ 17. - return datetime.strptime(iso_str[:19], ISOFORMAT) 18. + return datetime(*(time.strptime(iso_str[:19], ISOFORMAT)[0:6])) We need to patch the CR10 Build. This means from tag, as there have already been numerous commits to master. commit 8a9562f6d9a3741d2220b64914e8e612c04437ba tree fccf733a0d27f426271c473dd89bd657242eaa37 700122 - Fixed ISO date formatting for python 2.4 compatibility. src/pulp/client/json_utils.py test/unit/test_json_utils.py Added a unit test for this as well so we can take advantage of our hudson builders to detect these sorts of incompabilities. Fixed in Pulp 0.172, grinder 0.96. verified
[root@pulp-qe-rhel5 ~]# pulp-admin consumer list
+------------------------------------------+
Consumer Information
+------------------------------------------+
[root@pulp-qe-rhel5 ~]# pulp-admin consumer list
+------------------------------------------+
Consumer Information
+------------------------------------------+
Id rhel5-client
Description None
Subscribed Repos []
Agent:
Responding Yes
Last Heartbeat 2011-04-28 17:31:24
Additional info
[root@pulp-qe-rhel5 ~]# rpm -q pulp
pulp-0.0.172-1
[root@pulp-qe-rhel5 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |