| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 14f9d2c commit dd7e155
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | import re, sys, linecache | |
| 2 | 2 | from io import open | |
| 3 | - from os.path import abspath, dirname, relpath | ||
| 3 | + from os.path import abspath, dirname, relpath, exists | ||
| 4 | 4 | from traceback import format_list, format_exception_only | |
| 5 | 5 | ||
| 6 | 6 | ### encoding-pragma helpers ### | |
@@ -90,7 +90,8 @@ def extract_tb(tb, script=None, src=None): | |||
| 90 | 90 | ||
| 91 | 91 | # omit the internal plotdevice stack frames in `dist` builds | |
| 92 | 92 | 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__)) | ||
| 94 | 95 | if not debug: | |
| 95 | 96 | moduledir = abspath(dirname(dirname(__file__))) | |
| 96 | 97 | return [frame for frame in list if moduledir not in frame[0]] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments