From 3dc970ba835f29895fa52af809c33d9eb8969dde Mon Sep 17 00:00:00 2001 From: Antti Ajanki Date: Sat, 26 Mar 2011 12:25:54 +0200 Subject: DEBUG option in webvi_set_config() and --verbose option in webvi --- src/webvicli/webvicli/client.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/webvicli') diff --git a/src/webvicli/webvicli/client.py b/src/webvicli/webvicli/client.py index 9c092d4..6f40a2e 100644 --- a/src/webvicli/webvicli/client.py +++ b/src/webvicli/webvicli/client.py @@ -719,10 +719,14 @@ def parse_command_line(cmdlineargs, options): dest='templatepath', help='read video site templates from DIR', metavar='DIR', default=None) + parser.add_option('-v', '--verbose', action='store_const', const=1, + dest='verbose', help='debug output', default=0) cmdlineopt = parser.parse_args(cmdlineargs)[0] if cmdlineopt.templatepath is not None: options['templatepath'] = cmdlineopt.templatepath + if cmdlineopt.verbose > 0: + options['verbose'] = cmdlineopt.verbose return options @@ -753,6 +757,8 @@ def main(argv): options = load_config({}) options = parse_command_line(argv, options) + if options.has_key('verbose'): + webvi.api.set_config(WebviConfig.DEBUG, options['verbose']) if options.has_key('templatepath'): webvi.api.set_config(WebviConfig.TEMPLATE_PATH, options['templatepath']) -- cgit v1.2.3