Commit 585d3f69 authored by Tommy Olofsson's avatar Tommy Olofsson
Browse files

Do not assume system arguments.

parent 27dc184c
#!/usr/bin/env python
import time
import argparse
import labcomm
import sys
import time
class Reader(object):
......@@ -90,7 +91,7 @@ def dump_labels(current, _type):
print
def main():
def main(main_args):
parser = argparse.ArgumentParser()
parser.add_argument('elc', type=str, help="The log file.")
parser.add_argument('-f', '--follow', action='store_true',
......@@ -105,7 +106,7 @@ def main():
help="timeout to terminate when no changes are detected. "
"Requires -f.")
args = parser.parse_args()
args = parser.parse_args(main_args)
seen = {}
current = {}
_type = {}
......@@ -147,4 +148,4 @@ def main():
if __name__ == "__main__":
main()
main(sys.argv[1:])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment