]> granicus.if.org Git - python/commitdiff
Beefed up error-handling in 'setup()' a smidge:
authorGreg Ward <gward@python.net>
Sun, 26 Mar 2000 21:48:43 +0000 (21:48 +0000)
committerGreg Ward <gward@python.net>
Sun, 26 Mar 2000 21:48:43 +0000 (21:48 +0000)
handle OSError and DistutilsExecError now.

Lib/distutils/core.py

index df3646765f46a030a16a4274e1b638f1971620a0..5090f25bc37b98c6ed466ba3bbb2d7ce70280973 100644 (file)
@@ -98,13 +98,15 @@ def setup (**attrs):
             dist.run_commands ()
         except KeyboardInterrupt:
             raise SystemExit, "interrupted"
-        except IOError, exc:
+        except (OSError, IOError), exc:
             # 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)
+        except DistutilsExecError, msg:
+            raise SystemExit, "error: " + str (msg)
 
 # setup ()