Commit 1cea273758ad862bdc2862af864e4ef5b42f31ae

Tom Tromey 2016-05-03T08:23:51

Merge pull request #231 from berkerpeksag/simplfy-oserror Simplify error handling in mkdir_p()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/generate-darwin-source-and-headers.py b/generate-darwin-source-and-headers.py
index f551c35..005537f 100644
--- a/generate-darwin-source-and-headers.py
+++ b/generate-darwin-source-and-headers.py
@@ -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