[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Fix bug inside of oonibclient spotted in unittesting.



commit 95d67f74773b83e31a9da903b89581f2075d115d
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Fri Jan 31 13:51:43 2014 +0100

    Fix bug inside of oonibclient spotted in unittesting.
---
 ooni/oonibclient.py |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ooni/oonibclient.py b/ooni/oonibclient.py
index be5804f..84e12b5 100644
--- a/ooni/oonibclient.py
+++ b/ooni/oonibclient.py
@@ -103,6 +103,9 @@ class OONIBClient(object):
         
         def genReceiver(finished, content_length):
             def process_response(s):
+                # If empty string then don't parse it.
+                if not s:
+                    return
                 try:
                     response = json.loads(s)
                 except ValueError:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits