Commit 1200e42a authored by Greg Ward's avatar Greg Ward

Try to deal with pre-1.5.2 IOError exception objects.

parent c2898193
...@@ -99,8 +99,12 @@ def setup (**attrs): ...@@ -99,8 +99,12 @@ def setup (**attrs):
except KeyboardInterrupt: except KeyboardInterrupt:
raise SystemExit, "interrupted" raise SystemExit, "interrupted"
except IOError, exc: except IOError, exc:
# is this 1.5.2-specific? 1.5-specific? # arg, try to work with Python pre-1.5.2
raise SystemExit, "error: %s: %s" % (exc.filename, exc.strerror) if hasattr (exc, 'filename') and hasattr (exc, 'strerror'):
raise SystemExit, \
"error: %s: %s" % (exc.filename, exc.strerror)
else:
raise SystemExit, str (exc)
# setup () # setup ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment