summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>2015-03-10 13:42:27 (GMT)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2015-03-11 12:33:13 (GMT)
commit18c54316f304f3bc69a802660af466916cb002c9 (patch)
treebffa7e3037aee5263811dfa0bac516f773b7c079
parent22416e44dc0ba93fb889543ca1c62dcaff6243a0 (diff)
downloadlqa-18c54316f304f3bc69a802660af466916cb002c9.tar.gz
lqa-18c54316f304f3bc69a802660af466916cb002c9.tar.xz
Replace '--print-json' option for '-v', '--verbose'.
Allow to add verbose prints with this option (e.g. print the resulting json) Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
-rw-r--r--lqa_tool/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lqa_tool/__init__.py b/lqa_tool/__init__.py
index c76d2ee..f2c890c 100644
--- a/lqa_tool/__init__.py
+++ b/lqa_tool/__init__.py
@@ -131,8 +131,6 @@ See 'lqa <command> -h' to read about a specific subcommand.
metavar='JOB_FILE.json',
help="process these job files")
# prefixing the argument with -- means it's optional
- parser.add_argument('--print-json', action='store_true',
- help="print the json job to stdout")
parser.add_argument('-g', '--profile-file', metavar='PROFILE.yaml',
help="set profile file")
parser.add_argument('-n', '--dry-run', action='store_true',
@@ -145,6 +143,8 @@ See 'lqa <command> -h' to read about a specific subcommand.
help="set 'field:value' "
"template variables/values "
"(can be given multiple times")
+ parser.add_argument('-v', '--verbose', action='store_true',
+ help="Verbose mode (e.g. print the resulting json)")
# now that we're inside a subcommand, ignore the first TWO argvs
args = parser.parse_args(sys.argv[2:])
self.command = Lava(args).submit_job()
@@ -262,7 +262,7 @@ class Lava(object):
if variables:
json_obj = replaceTemplateFields(json_obj, variables)
- if self.args.print_json:
+ if self.args.verbose:
print json.dumps(json_obj, indent=2)
if not self.args.dry_run: