FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

include internal stack frames when run from repo · plotdevice/plotdevice@dd7e155 · GitHub

Repository navigation

Commit dd7e155

Browse files
committed
include internal stack frames when run from repo
1 parent 14f9d2c commit dd7e155

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎plotdevice/run/common.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import re, sys, linecache
22
from io import open
3-
from os.path import abspath, dirname, relpath
3+
from os.path import abspath, dirname, relpath, exists
44
from traceback import format_list, format_exception_only
55

66
### encoding-pragma helpers ###
@@ -90,7 +90,8 @@ def extract_tb(tb, script=None, src=None):
9090

9191
# omit the internal plotdevice stack frames in `dist` builds
9292
from AppKit import NSBundle
93-
debug = 'flux' in NSBundle.mainBundle().infoDictionary().get('CFBundleVersion','')
93+
debug = 'flux' in NSBundle.mainBundle().infoDictionary().get('CFBundleVersion','') \
94+
or exists('%s/../../setup.py'%dirname(__file__))
9495
if not debug:
9596
moduledir = abspath(dirname(dirname(__file__)))
9697
return [frame for frame in list if moduledir not in frame[0]]

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL