Merge pull request #231 from berkerpeksag/simplfy-oserror
authorTom Tromey <tom@tromey.com>
Tue, 3 May 2016 14:23:51 +0000 (08:23 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 3 May 2016 14:23:51 +0000 (08:23 -0600)
Simplify error handling in mkdir_p()

generate-darwin-source-and-headers.py

index f551c35..005537f 100644 (file)
@@ -91,9 +91,7 @@ def mkdir_p(path):
     try:
         os.makedirs(path)
     except OSError as exc:  # Python >2.5
-        if exc.errno == errno.EEXIST:
-            pass
-        else:
+        if exc.errno != errno.EEXIST:
             raise