Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r3057:dfb27809ae0f
Date: 2018-01-08 22:09 +0100
http://bitbucket.org/cffi/cffi/changeset/dfb27809ae0f/

Log:    Issue #351

        improve error message in this deprecated file

diff --git a/cffi/verifier.py b/cffi/verifier.py
--- a/cffi/verifier.py
+++ b/cffi/verifier.py
@@ -301,7 +301,6 @@
     return suffixes
 
 def _ensure_dir(filename):
-    try:
-        os.makedirs(os.path.dirname(filename))
-    except OSError:
-        pass
+    dirname = os.path.dirname(filename)
+    if dirname and not os.path.isdir(dirname):
+        os.makedirs(dirname)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to