From fd8b04b033637f395bb3612db38acb1678dff2da Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Mon, 29 Jun 2015 15:19:26 +0200 Subject: [PATCH] schedule.py: make main() argv as an argument Instead of using sys.argv implicitly, which is inconvenient for testing. Signed-off-by: Loic Dachary --- scripts/schedule.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/schedule.py b/scripts/schedule.py index 0c0348c11d..c6c73dde7a 100644 --- a/scripts/schedule.py +++ b/scripts/schedule.py @@ -2,6 +2,7 @@ import docopt import teuthology.misc import teuthology.schedule +import sys doc = """ usage: teuthology-schedule -h @@ -39,6 +40,6 @@ optional arguments: """ -def main(): - args = docopt.docopt(doc) +def main(argv=sys.argv[1:]): + args = docopt.docopt(doc, argv=argv) teuthology.schedule.main(args) -- 2.39.5