From: Loic Dachary Date: Mon, 29 Jun 2015 13:19:26 +0000 (+0200) Subject: schedule.py: make main() argv as an argument X-Git-Tag: 1.1.0~896^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F553%2Fhead;p=teuthology.git schedule.py: make main() argv as an argument Instead of using sys.argv implicitly, which is inconvenient for testing. Signed-off-by: Loic Dachary --- diff --git a/scripts/schedule.py b/scripts/schedule.py index 0c0348c11..c6c73dde7 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)