From 63c6660895c83967c5d93499bcda3e233f722ded Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 13 Jun 2016 18:17:09 -0700 Subject: update examples, tests, docs --- examples/har_extractor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/har_extractor.py') 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" ' -- cgit v1.2.3