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

hiro at torproject.org hiro at torproject.org
Wed Oct 16 11:46:30 UTC 2019


commit b57c66b7e9d7dcf0056f98c2cf113141000b85b7
Author: hiro <hiro at torproject.org>
Date:   Wed Oct 16 13:46:27 2019 +0200

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

diff --git a/gettor/parse/email.py b/gettor/parse/email.py
index b7a65db..0768356 100644
--- a/gettor/parse/email.py
+++ b/gettor/parse/email.py
@@ -151,13 +151,10 @@ class EmailParser(object):
         return request
 
 
-    def too_many_requests(self, request_id, hid, request_service, num_request, limit):
-        # check limit first
-        num_requests = limit
-
+    def too_many_requests(self, request_id, hid, request_service, num_requests, limit):
         if hid.hexdigest() == self.settings.get('test_hid'):
             return False
-        elif num_requests[0][0] < email_requests_limit:
+        elif num_requests[0][0] < limit:
             return False
         else:
             return True



More information about the tor-commits mailing list