We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc436ba commit fe6e627Copy full SHA for fe6e627
1 file changed
plotdevice/__init__.py
@@ -11,7 +11,7 @@ class DeviceError(Exception):
11
import sys, re
12
called_from = getattr(sys.modules['__main__'], '__file__', '<interactive>')
13
is_windowed = bool(re.search(r'plotdevice(-app|/run/console)\.py$', called_from))
14
-in_setup = bool(sys.modules['__main__'].__file__.endswith('setup.py'))
+in_setup = bool(called_from.endswith('setup.py'))
15
16
# add the Extras directory to sys.path since every module depends on PyObjC and friends
17
try:
0 commit comments