]> jfr.im git - z_archive/twitter.git/commitdiff
Revert JSON formatter change
authorMike Verdone <redacted>
Sat, 30 Aug 2014 14:23:13 +0000 (16:23 +0200)
committerMike Verdone <redacted>
Sat, 30 Aug 2014 14:23:13 +0000 (16:23 +0200)
twitter/cmdline.py

index 472f70cd4a072641a1949e0ce4415e3520213a42..0c21a8b8992699094308eb7867896283f6931ec7 100755 (executable)
@@ -435,18 +435,10 @@ class StatusAction(Action):
     def __call__(self, twitter, options):
         statuses = self.getStatuses(twitter, options)
         sf = get_formatter('status', options)
-        if options['format'] == "json":
-            printNicely("[")
-            for status in statuses[:-1]:
-                statusStr = sf(status, options)
-                if statusStr.strip():
-                    printNicely(statusStr+",")
-            printNicely(sf(statuses[-1], options)+"]")
-        else:
-            for status in statuses:
-                statusStr = sf(status, options)
-                if statusStr.strip():
-                    printNicely(statusStr)
+        for status in statuses:
+            statusStr = sf(status, options)
+            if statusStr.strip():
+                printNicely(statusStr)
 
 class SearchAction(Action):
     def __call__(self, twitter, options):