From 3f03ca0ac9a01e7400ce021b665c8a1efb1343a1 Mon Sep 17 00:00:00 2001 From: Robert Tice Date: Thu, 28 Mar 2019 16:11:28 -0400 Subject: [PATCH] Fixing off-by-one error in run.py arg parsing. --- infrastructure/container_payload/run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure/container_payload/run.py b/infrastructure/container_payload/run.py index 4f57fdf..34f106b 100644 --- a/infrastructure/container_payload/run.py +++ b/infrastructure/container_payload/run.py @@ -297,11 +297,11 @@ def safe_run(workdir, mode, lab): if __name__ == '__main__': # perform some sanity checking on args - this is not meant to # be launched interactively - if len(sys.argv) >= 2: + if len(sys.argv) >= 3: workdir = sys.argv[1] mode = sys.argv[2] - if len(sys.argv) == 3: + if len(sys.argv) == 4: lab = sys.argv[3] else: lab = None