From 23bbdab7a1f96831ccd210be454c9ad2e4c39f92 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 6 Mar 2012 17:52:35 +0100 Subject: [PATCH] add debug flag --- bin/pandora_client | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/pandora_client b/bin/pandora_client index d330f8d..c0c5ecd 100755 --- a/bin/pandora_client +++ b/bin/pandora_client @@ -18,7 +18,10 @@ import pandora_client if __name__ == '__main__': usage = "usage: %prog [options] action" parser = OptionParser(usage=usage) - parser.add_option('-c', '--config', dest='config', help='config.json containing config', default='~/.ox/client.json', type='string') + parser.add_option('-c', '--config', dest='config', + help='config.json containing config', default='~/.ox/client.json', type='string') + parser.add_option('-d', '--debug', dest='debug', + help='output debug information', action="store_true") (opts, args) = parser.parse_args() opts.config = os.path.expanduser(opts.config) @@ -46,6 +49,7 @@ if __name__ == '__main__': "media": '~/.ox/media', "volumes": {} }, f, indent=2) + pandora_client.DEBUG = opts.debug c = pandora_client.Client(opts.config, offline) getattr(c, action)(args[1:])