diff --git a/picopore/parse_args.py b/picopore/parse_args.py index 5f8ecae..00a7274 100644 --- a/picopore/parse_args.py +++ b/picopore/parse_args.py @@ -27,17 +27,23 @@ def checkDeprecatedArgs(): args = sys.argv[1:] + if "--realtime" in args: + args.remove('--realtime') + args = ['picopore-realtime'] + args + warnings.warn("picopore --realtime will be deprecated in 1.3.0. Use picopore-realtime instead.",FutureWarning) + elif "--test" in args: + args.remove('--test') + args = ['picopore-test'] + args + warnings.warn("picopore --test will be deprecated in 1.3.0. Use picopore-test instead.",FutureWarning) + else: + return + p = subprocess.Popen(args) try: - if "--realtime" in args: - args.remove('--realtime') - warnings.warn("picopore --realtime will be deprecated in 1.3.0. Use picopore-realtime instead.",FutureWarning) - exit(subprocess.call(['picopore-realtime'] + args)) - if "--test" in args: - args.remove('--test') - warnings.warn("picopore --test will be deprecated in 1.3.0. Use picopore-test instead.",FutureWarning) - exit(subprocess.call(['picopore-test'] + args)) + p.wait() except KeyboardInterrupt: - exit(0) + p.send_signal(signal.SIGINT) + p.wait() + exit(p.returncode) def checkInputs(args): args.input = [os.path.abspath(i) for i in args.input]