From: David-Sarah Hopwood Date: Fri, 4 Jan 2013 05:32:24 +0000 (+0000) Subject: tahoe_ls.py: JSON responses don't need quotemarks or quoted newlines. X-Git-Tag: allmydata-tahoe-1.10a1~17 X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/running.html?a=commitdiff_plain;h=ea9dfb0de169d2ec17d22e833b116470fb875742;p=tahoe-lafs%2Ftahoe-lafs.git tahoe_ls.py: JSON responses don't need quotemarks or quoted newlines. Signed-off-by: David-Sarah Hopwood --- diff --git a/src/allmydata/scripts/tahoe_ls.py b/src/allmydata/scripts/tahoe_ls.py index e64e9d20..78eea1f2 100644 --- a/src/allmydata/scripts/tahoe_ls.py +++ b/src/allmydata/scripts/tahoe_ls.py @@ -47,14 +47,16 @@ def list(options): print >>stdout, data return 0 else: - print >>stderr, "The JSON response contained unprintable characters:\n%s" % quote_output(data) + print >>stderr, "The JSON response contained unprintable characters:" + print >>stderr, quote_output(data, quotemarks=False) return 1 try: parsed = simplejson.loads(data) except Exception, e: print >>stderr, "error: %s" % quote_output(e.args[0], quotemarks=False) - print >>stderr, "Could not parse JSON response:\n%s" % quote_output(data) + print >>stderr, "Could not parse JSON response:" + print >>stderr, quote_output(data, quotemarks=False) return 1 nodetype, d = parsed