Modify

Ticket #761 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

[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

bcfg2-proxy (398 bytes) - added by Guilhem Lettron <[email protected]…> 14 years ago.
patch

Change History

Changed 14 years ago by Guilhem Lettron <[email protected]…>

patch

comment:1 Changed 14 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

Committed in r5481. Thanks for the patch.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.