diff options
Diffstat (limited to 'examples/har_extractor.py')
-rw-r--r-- | examples/har_extractor.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py index 6806989d..c21f1a8f 100644 --- a/examples/har_extractor.py +++ b/examples/har_extractor.py @@ -3,6 +3,7 @@ https://github.com/JustusW/harparser to generate a HAR log object. """ import six +import sys from harparser import HAR from datetime import datetime @@ -52,15 +53,15 @@ class _HARLog(HAR.log): return self.__page_list__ -def start(context, argv): +def start(context): """ On start we create a HARLog instance. You will have to adapt this to suit your actual needs of HAR generation. As it will probably be necessary to cluster logs by IPs or reset them from time to time. """ context.dump_file = None - if len(argv) > 1: - context.dump_file = argv[1] + if len(sys.argv) > 1: + context.dump_file = sys.argv[1] else: raise ValueError( 'Usage: -s "har_extractor.py filename" ' |