Skip to content

Commit

Permalink
solve NameError bug on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 30, 2021
1 parent a333542 commit 2cf294a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

* Moved import of `subprocess` to top of file `compas._os.py`.

### Removed


Expand Down
5 changes: 4 additions & 1 deletion src/compas/_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import shutil
import sys
import tempfile
import subprocess

try:
NotADirectoryError
Expand Down Expand Up @@ -113,7 +114,6 @@ def is_blender():


if is_windows():
import subprocess
import ctypes
import ctypes.wintypes

Expand Down Expand Up @@ -146,6 +146,9 @@ def __init__(self, **kw):
INFINITE = -1


# seems a bit weird that this is done here, since it is only relevant for Rhino/GH
# also, perhasps it makes more sense this is done at the top of the file
# since it defines a few module-wide variables
try:
from compas_bootstrapper import PYTHON_DIRECTORY
except: # noqa: E722
Expand Down
2 changes: 1 addition & 1 deletion src/compas_rhino/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _get_ironpython_lib_path(version):
# However, since it is only used to clean up potential old installations
# it does not seem crucial anymore.
ironpython_lib_path = None
print("The lib folder for IronPython does not exist in this location: {}".format(ironpython_lib_path))
# print("The lib folder for IronPython does not exist in this location: {}".format(ironpython_lib_path))

return ironpython_lib_path

Expand Down

0 comments on commit 2cf294a

Please sign in to comment.