summaryrefslogtreecommitdiff
path: root/cffi/verifier.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2018-01-08 22:09:15 +0100
committerArmin Rigo <arigo@tunes.org>2018-01-08 22:09:15 +0100
commit9c71e8237992050af8b9202d6d3bc37ce2f53f69 (patch)
treec446323daa1be4e3ceffa8bd67d6a60e3a417234 /cffi/verifier.py
parentc2587d6dd77d35b01cfef2580ff432c773ecc876 (diff)
downloadcffi-9c71e8237992050af8b9202d6d3bc37ce2f53f69.tar.gz
Issue #351
improve error message in this deprecated file
Diffstat (limited to 'cffi/verifier.py')
-rw-r--r--cffi/verifier.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cffi/verifier.py b/cffi/verifier.py
index 3cfeecb..59b78c2 100644
--- a/cffi/verifier.py
+++ b/cffi/verifier.py
@@ -301,7 +301,6 @@ def _get_so_suffixes():
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)