mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix get_debug_executable()
This commit is contained in:
parent
61005add0d
commit
286f69bf9d
@ -22,14 +22,16 @@ def get_debug_executable():
|
||||
if getattr(sys, 'run_local', None):
|
||||
return [sys.run_local, exe_name]
|
||||
nearby = os.path.join(os.path.dirname(os.path.abspath(sys.executable)), exe_name)
|
||||
if getattr(sys, 'frozen', False) or os.path.exists(nearby):
|
||||
if getattr(sys, 'frozen', False):
|
||||
return [nearby]
|
||||
exloc = getattr(sys, 'executables_location', None)
|
||||
if exloc:
|
||||
ans = os.path.join(exloc, exe_name)
|
||||
if os.path.exists(ans):
|
||||
return ans
|
||||
return exe_name
|
||||
return [ans]
|
||||
if os.path.exists(nearby):
|
||||
return [nearby]
|
||||
return [exe_name]
|
||||
|
||||
|
||||
def run_calibre_debug(*args, **kw):
|
||||
|
Loading…
x
Reference in New Issue
Block a user