Ticket #761 (closed defect: fixed)
[patch] sys.version
Reported by: | Guilhem Lettron <[email protected]…> | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.0.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | karmic | Cc: |
Description
I have patch proxy.py to limit sys.version to minor and major versions.
If the version is (2,6,4rc1) has is it on Ubuntu karmic, it doesn't work.
For information, the error is : Traceback (most recent call last):
File "/usr/sbin/bcfg2", line 19, in <module>
import Bcfg2.Proxy
File "/usr/lib/python2.6/dist-packages/Bcfg2/Proxy.py", line 26, in <module>
has_py26 = map(int,version) >= [2,6]
ValueError?: invalid literal for int() with base 10: '4rc1'
Patch
Index: src/lib/Proxy.py =================================================================== --- src/lib/Proxy.py (révision 5480) +++ src/lib/Proxy.py (copie de travail) @@ -34,7 +34,7 @@
import urlparse import xmlrpclib
-version = string.split(string.split(sys.version)[0], ".") +version = sys.version_info[:2]
has_py23 = map(int, version) >= [2, 3] has_py26 = map(int, version) >= [2, 6]
Attachments
Change History
Changed 14 years ago by Guilhem Lettron <[email protected]…>
- Attachment bcfg2-proxy added
patch