Skip to content

Commit

Permalink
Fix issue with external: being logged for all modules in binary builds.
Browse files Browse the repository at this point in the history
If the code object's file name is not an absolute path, never treat it as external, as code in library.zip reports relative paths in binary builds.
Re #3370.
  • Loading branch information
jcsteh committed Aug 23, 2013
1 parent c418dba commit 441885e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/logHandler.py
Expand Up @@ -32,7 +32,11 @@ def getCodePath(f):
@rtype: string
"""
fn=f.f_code.co_filename
if fn[0] != "<" and not fn.startswith(sys.path[0] + "\\"):
if fn[0] != "<" and os.path.isabs(fn) and not fn.startswith(sys.path[0] + "\\"):
# This module is external because:
# the code comes from a file (fn doesn't begin with "<");
# it has an absolute file path (code bundled in binary builds reports relative paths); and
# it is not part of NVDA's Python code (not beneath sys.path[0]).
path="external:"
else:
path=""
Expand Down

0 comments on commit 441885e

Please sign in to comment.