Description of problem: python-bugzilla in EPEL5 has python2.4-incompatible syntax: bugzilla Traceback (most recent call last): File "/usr/bin/bugzilla", line 17, in ? import bugzilla.util File "/usr/lib/python2.4/site-packages/bugzilla/util.py", line 31 except OSError as e: Here is 1-line fix: perl -pi -e "s/except (.*) as (.*):/except \$1, \$2:/g" /usr/lib/python2.4/site-packages/bugzilla/util.py # rpm -q python-bugzilla python-bugzilla-0.7.0-1.el5 Version-Release number of selected component (if applicable): 0.7.0-1.el5 How reproducible: Steps to Reproduce: 1.Install python-bugzilla 2.run bugzilla Actual results: # bugzilla Traceback (most recent call last): File "/usr/bin/bugzilla", line 17, in ? import bugzilla.util File "/usr/lib/python2.4/site-packages/bugzilla/util.py", line 31 except OSError as e: Expected results: # bugzilla usage: bugzilla [global options] COMMAND [command-options] Commands: login, new, query, modify, attach, info bugzilla: error: command must be one of: login,new,query,modify,attach,info Additional info:
Created attachment 610371 [details] Updated python-bugzilla-2.4-backcompat.patch Here's the python-bugzilla 2.4 backcompat patch updated to fix the exception syntax. The changed portion is this addition: Index: python-bugzilla-0.7.0/bugzilla/util.py =================================================================== --- python-bugzilla-0.7.0.orig/bugzilla/util.py +++ python-bugzilla-0.7.0/bugzilla/util.py @@ -28,7 +28,7 @@ def open_without_clobber(name, *args): while fd is None: try: fd = os.open(name, os.O_CREAT|os.O_EXCL, 0666) - except OSError as e: + except OSError, e: if e.errno == os.errno.EEXIST: name = "%s.%i" % (orig_name, count) count += 1 I checked that there are presently no other places that use the as syntax. If we're preparing (in upstream) for python3, we probably want to switch all exception handling to the as syntax and the difference will become greater. (Perhaps we'd be able to use 3to2 on that, though)....
python-bugzilla-0.7.0-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/python-bugzilla-0.7.0-2.el5
Thanks Toshio, I used your fix.
Package python-bugzilla-0.7.0-2.el5: * should fix your issue, * was pushed to the Fedora EPEL 5 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing python-bugzilla-0.7.0-2.el5' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-13225/python-bugzilla-0.7.0-2.el5 then log in and leave karma (feedback).
Package hit stable