We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f08e4f commit 7a0620cCopy full SHA for 7a0620c
Lib/distutils/core.py
@@ -99,8 +99,12 @@ def setup (**attrs):
99
except KeyboardInterrupt:
100
raise SystemExit, "interrupted"
101
except IOError, exc:
102
- # is this 1.5.2-specific? 1.5-specific?
103
- raise SystemExit, "error: %s: %s" % (exc.filename, exc.strerror)
+ # arg, try to work with Python pre-1.5.2
+ if hasattr (exc, 'filename') and hasattr (exc, 'strerror'):
104
+ raise SystemExit, \
105
+ "error: %s: %s" % (exc.filename, exc.strerror)
106
+ else:
107
+ raise SystemExit, str (exc)
108
109
# setup ()
110
0 commit comments