Removes unnecessary list handling from -c flag. (#659)
diff --git a/mobly/suite_runner.py b/mobly/suite_runner.py
index 83dca42..8e7eab0 100644
--- a/mobly/suite_runner.py
+++ b/mobly/suite_runner.py
@@ -57,7 +57,6 @@
parser = argparse.ArgumentParser(description='Mobly Suite Executable.')
parser.add_argument('-c',
'--config',
- nargs=1,
type=str,
required=True,
metavar='<PATH>',
@@ -73,7 +72,7 @@
argv = sys.argv[1:]
args = parser.parse_args(argv)
# Load test config file.
- test_configs = config_parser.load_test_config_file(args.config[0])
+ test_configs = config_parser.load_test_config_file(args.config)
# Check the classes that were passed in
for test_class in test_classes:
diff --git a/mobly/test_runner.py b/mobly/test_runner.py
index 05cd36b..84ddd34 100644
--- a/mobly/test_runner.py
+++ b/mobly/test_runner.py
@@ -64,7 +64,7 @@
_print_test_names(test_class)
sys.exit(0)
# Load test config file.
- test_configs = config_parser.load_test_config_file(args.config[0],
+ test_configs = config_parser.load_test_config_file(args.config,
args.test_bed)
# Parse test specifiers if exist.
tests = None
@@ -110,7 +110,6 @@
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('-c',
'--config',
- nargs=1,
type=str,
metavar='<PATH>',
help='Path to the test configuration file.')