casperjs executable now gracefully exists on KeyboardInterrupt
Showing
1 changed file
with
5 additions
and
1 deletions
... | @@ -14,4 +14,8 @@ CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), ' | ... | @@ -14,4 +14,8 @@ CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), ' |
14 | CASPER_ARGS = ['phantomjs', os.path.join(CASPER_PATH, 'casper.js'), '--casper-path=%s' % CASPER_PATH, '--cli'] | 14 | CASPER_ARGS = ['phantomjs', os.path.join(CASPER_PATH, 'casper.js'), '--casper-path=%s' % CASPER_PATH, '--cli'] |
15 | CASPER_ARGS.extend(sys.argv[1:]) | 15 | CASPER_ARGS.extend(sys.argv[1:]) |
16 | 16 | ||
17 | subprocess.call(CASPER_ARGS) | 17 | try: |
18 | subprocess.call(CASPER_ARGS) | ||
19 | except KeyboardInterrupt: | ||
20 | print '\nCasperJS interrupted, exiting.' | ||
21 | sys.exit() | ... | ... |
-
Please register or sign in to post a comment