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

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



commit b57c66b7e9d7dcf0056f98c2cf113141000b85b7
Author: hiro <hiro@xxxxxxxxxxxxxx>
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

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