Commit 64a9d491 authored by Hiro's avatar Hiro 🏄
Browse files

Fix too many requests check

parent a215b206
...@@ -156,16 +156,16 @@ class EmailParser(object): ...@@ -156,16 +156,16 @@ class EmailParser(object):
num_requests = limit num_requests = limit
if hid.hexdigest() == self.settings.get('test_hid'): if hid.hexdigest() == self.settings.get('test_hid'):
return 0 return False
else: else:
num_requests = yield conn.get_num_requests( num_requests = yield conn.get_num_requests(
id=hid.hexdigest(), service=request_service id=hid.hexdigest(), service=request_service
) )
if num_requests[0][0] < email_requests_limit: if num_requests[0][0] < email_requests_limit:
return 0 return False
else: else:
return 1 return True
def parse(self, msg_str): def parse(self, msg_str):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment