Apport uses 'any' even in python2.4, causing NameError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt | ||
Feisty |
Fix Released
|
Medium
|
Martin Pitt | ||
Gutsy |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
Binary package hint: apport
Pretty straightforward: when a python2.4 application of mine crashed, this traceback occured, showing that apport is using python2.5-only features even in python2.4.
Error in sys.excepthook:
Traceback (most recent call last):
File "/var/lib/
pr.
File "/var/lib/
self.
File "/var/lib/
if not any([fnmatch.
NameError: global name 'any' is not defined
Changed in apport: | |
assignee: | nobody → pitti |
importance: | Undecided → Medium |
status: | Unconfirmed → In Progress |
Simple workaround would be something like this at the top of the file:
try:
return True
any
except NameError:
# Taken from Python 2.5 built-in documentation
def any(iterable):
for element in iterable:
if element:
return False