pastebinit does not work with python3 (modifications suggested)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pastebinit |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Hi,
I am the archlinux packager for your application. Archlinux switched to python3 some days ago. I patched for archlinux your software in order to use python2 instead python3 (default).
I tried to use python3 and some errors appeared.
I corrected print calls, an exception and urllib usage.
I have again an error with configobj which has been patched on archlinux to be compatible with python3. i ignore for the moment where the error comes from.
Traceback (most recent call last):
File "/usr/bin/
bininstance = configobj.
File "/usr/lib/
self.
File "/usr/lib/
if (not line) or (line[-1] not in ('\r', '\n', '\r\n')):
TypeError: 'int' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/
pastebind = preloadPastebins() #get the config from /etc/pastebin.d/
File "/usr/bin/
except(
NameError: global name 'e' is not defined
I will investigate more as soon as I have enough time. For the moment, I can give you a patch with my corrections.
I hope it could help.
Regards.
Changed in pastebinit: | |
status: | Fix Committed → Fix Released |
Hi,
I just ran 2to3 on pastebinit again to check what would need to be updated to get it running on python 3.2.
Sadly the needed changes break compatibility with python < 3.0 so it's not really an option for now.
Once python 3 is shipped by default on most distros, I'll be happy to convert pastebinit and change the interpreter accordingly.