Commit 3c03103e 3c03103e167ace69463ec02ee38a762e1e548918 by Nicolas Perriault

refs #49, #50 - fixed ordering of passed phantomjs native options

1 parent bfd295f5
...@@ -27,15 +27,14 @@ PHANTOMJS_NATIVE_ARGS = [ ...@@ -27,15 +27,14 @@ PHANTOMJS_NATIVE_ARGS = [
27 CASPER_ARGS = [] 27 CASPER_ARGS = []
28 PHANTOMJS_ARGS = [] 28 PHANTOMJS_ARGS = []
29 29
30 found = False
31 for arg in sys.argv[1:]: 30 for arg in sys.argv[1:]:
31 found = False
32 for native in PHANTOMJS_NATIVE_ARGS: 32 for native in PHANTOMJS_NATIVE_ARGS:
33 if arg.startswith('--%s' % native): 33 if arg.startswith('--%s' % native):
34 PHANTOMJS_ARGS.append(arg) 34 PHANTOMJS_ARGS.append(arg)
35 found = True 35 found = True
36 if not found: 36 if not found:
37 CASPER_ARGS.append(arg) 37 CASPER_ARGS.append(arg)
38 found = False
39 38
40 CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), '..')) 39 CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), '..'))
41 CASPER_COMMAND = os.environ.get('PHANTOMJS_EXECUTABLE', 'phantomjs').split(' ') 40 CASPER_COMMAND = os.environ.get('PHANTOMJS_EXECUTABLE', 'phantomjs').split(' ')
......