mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix the -c option to calibre-debug
This commit is contained in:
parent
961aa7c15b
commit
2d512fa7f7
@ -19,7 +19,7 @@ Run an embedded python interpreter.
|
||||
parser.add_option('--update-module', help='Update the specified module in the frozen library. '+
|
||||
'Module specifications are of the form full.name.of.module,path_to_module.py', default=None
|
||||
)
|
||||
parser.add_option('-c', help='Run python code.', default=None, dest='command')
|
||||
parser.add_option('-c', '--command', help='Run python code.', default=None)
|
||||
return parser
|
||||
|
||||
def update_zipfile(zipfile, mod, path):
|
||||
@ -43,6 +43,7 @@ def main(args=sys.argv):
|
||||
mod, path = opts.update_module.partition(',')[0], opts.update_module.partition(',')[-1]
|
||||
update_module(mod, os.path.expanduser(path))
|
||||
elif opts.command:
|
||||
sys.argv = args[:1]
|
||||
exec opts.command
|
||||
else:
|
||||
from IPython.Shell import IPShellEmbed
|
||||
|
Loading…
x
Reference in New Issue
Block a user