Do not modify sys.path when using calibre-debug to run files in the calibre source code, since calibre always uses absolute imports anyway

This commit is contained in:
Kovid Goyal 2014-11-24 09:17:34 +05:30
parent c9b2cdfd67
commit e2eed912b2

View File

@ -193,6 +193,7 @@ def run_script(path, args):
sys.argv = [path] + args
ef = os.path.abspath(path)
if '/src/calibre/' not in ef.replace(os.pathsep, '/'):
base = os.path.dirname(ef)
sys.path.insert(0, base)
g = globals()