summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r--Lib/distutils/core.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py
index ddd39a2..a92bff9 100644
--- a/Lib/distutils/core.py
+++ b/Lib/distutils/core.py
@@ -99,8 +99,12 @@ def setup (**attrs):
except KeyboardInterrupt:
raise SystemExit, "interrupted"
except IOError, exc:
- # is this 1.5.2-specific? 1.5-specific?
- 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'):
+ raise SystemExit, \
+ "error: %s: %s" % (exc.filename, exc.strerror)
+ else:
+ raise SystemExit, str (exc)
# setup ()