Commit c6b92fa9 c6b92fa9b7153af0e71ad188203f64cbe53563ab by Nicolas Perriault

casperjs executable now gracefully exists on KeyboardInterrupt

1 parent 87f4d0bd
...@@ -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()
......