From d370aa6209b46e247111e837a82c77ec5a2cbbf4 Mon Sep 17 00:00:00 2001 From: Olivier Scherler Date: Tue, 17 Apr 2012 00:24:32 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Don=E2=80=99t=20forget=20to=20actually=20us?= =?UTF-8?q?e=20those=20thoroughly=20processed=20-F=20options.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openphoto/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openphoto/main.py b/openphoto/main.py index 732a12f..9f85c6f 100644 --- a/openphoto/main.py +++ b/openphoto/main.py @@ -45,9 +45,9 @@ def main(args=sys.argv[1:]): client = OpenPhoto(options.host, consumer_key, consumer_secret, token, token_secret) if options.method == "GET": - result = client.get(options.endpoint) + result = client.get(options.endpoint, params) else: - result = client.post(options.endpoint) + result = client.post(options.endpoint, params) if options.verbose: print "==========\nMethod: %s\nHost: %s\nEndpoint: %s\n==========\n\n" % (options.method, options.host, options.endpoint) From 4983a1890562dc7feb3d3330582307b5d53008c0 Mon Sep 17 00:00:00 2001 From: Olivier Scherler Date: Tue, 17 Apr 2012 00:25:47 +0200 Subject: [PATCH 2/2] Added fields to verbose output. --- openphoto/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openphoto/main.py b/openphoto/main.py index 9f85c6f..f8df7ad 100644 --- a/openphoto/main.py +++ b/openphoto/main.py @@ -50,7 +50,12 @@ def main(args=sys.argv[1:]): result = client.post(options.endpoint, params) if options.verbose: - print "==========\nMethod: %s\nHost: %s\nEndpoint: %s\n==========\n\n" % (options.method, options.host, options.endpoint) + print "==========\nMethod: %s\nHost: %s\nEndpoint: %s" % (options.method, options.host, options.endpoint) + if len( params ) > 0: + print "Fields:" + for kv in params.iteritems(): + print " %s=%s" % kv + print "==========\n" if options.pretty: print json.dumps(json.loads(result), sort_keys=True, indent=4, separators=(',',':'))