]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
tahoe_ls.py: JSON responses don't need quotemarks or quoted newlines.
authorDavid-Sarah Hopwood <david-sarah@jacaranda.org>
Fri, 4 Jan 2013 05:32:24 +0000 (05:32 +0000)
committerDavid-Sarah Hopwood <david-sarah@jacaranda.org>
Thu, 7 Mar 2013 16:22:47 +0000 (16:22 +0000)
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
src/allmydata/scripts/tahoe_ls.py

index e64e9d2049028df67c8ab3d4d0964f8a4004ce2f..78eea1f26ab1749bcc0147a46d6faad69c1f4a37 100644 (file)
@@ -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