Skip to content
Snippets Groups Projects
Commit b472b10e authored by Boris Feld's avatar Boris Feld
Browse files

Add proper argument parsing

parent 20c27d9f
No related branches found
No related tags found
No related merge requests found
"""
Usage:
python scheduler.py TASKS
The TASKS file is a text file containing one task per line:
RUN 4.7.2
......@@ -18,6 +15,7 @@
"""
import argparse
import sys
import time
import shlex
......@@ -82,7 +80,7 @@
print("=" * 80)
print("Got task %r" % task)
run(task)
print("\n"*2)
print("\n" * 2)
remove_task(next_task, task_file_path)
print("=" * 80)
......@@ -90,4 +88,9 @@
if __name__ == "__main__":
main(sys.argv[1])
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("TASKS", help="The file path to the task file")
args = parser.parse_args(sys.argv[1:])
main(args.TASKS)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment