Skip to content

Commit 41b1a2c

Browse files
committed
added NotAdIrectoryError fallback for python 2
1 parent c7b0f80 commit 41b1a2c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/compas/_os.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
import os
77
import sys
88

9+
try:
10+
NotADirectoryError
11+
except NameError:
12+
class NotADirectoryError(Exception):
13+
pass
914

1015
PY3 = sys.version_info[0] == 3
1116
system = sys.platform
@@ -71,7 +76,7 @@ def prepare_environment():
7176
variables.
7277
"""
7378
env = os.environ.copy()
74-
79+
7580
if PYTHON_DIRECTORY:
7681
lib_bin = os.path.join(PYTHON_DIRECTORY, 'Library', 'bin')
7782
if os.path.exists(lib_bin):

0 commit comments

Comments
 (0)