From 2d512fa7f72510e1b850e7537d3c623b573de8b5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 21 Jul 2008 10:22:22 -0700 Subject: [PATCH] Fix the -c option to calibre-debug --- src/calibre/debug.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/debug.py b/src/calibre/debug.py index ab990b38a8..aecff15351 100644 --- a/src/calibre/debug.py +++ b/src/calibre/debug.py @@ -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