[tor-commits] [gettor/master] Fix too many requests check

hiro at torproject.org hiro at torproject.org
Wed Oct 16 11:35:15 UTC 2019


commit 64a9d4913179aa882286b31dd43e8dead2a9bba5
Author: hiro <hiro at torproject.org>
Date:   Wed Oct 16 13:35:12 2019 +0200

    Fix too many requests check
---
 gettor/parse/email.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gettor/parse/email.py b/gettor/parse/email.py
index 72d992d..ac3aa89 100644
--- a/gettor/parse/email.py
+++ b/gettor/parse/email.py
@@ -156,16 +156,16 @@ class EmailParser(object):
         num_requests = limit
 
         if hid.hexdigest() == self.settings.get('test_hid'):
-            return 0
+            return False
         else:
             num_requests = yield conn.get_num_requests(
                 id=hid.hexdigest(), service=request_service
             )
 
         if num_requests[0][0] < email_requests_limit:
-            return 0
+            return False
         else:
-            return 1
+            return True
 
 
     def parse(self, msg_str):



More information about the tor-commits mailing list