From 2a5680c16db25be946bc215896505a2709ddd115 Mon Sep 17 00:00:00 2001 From: Richard Bronkhorst Date: Sun, 25 Jun 2023 19:32:35 +0200 Subject: [PATCH] Update api.py --- nullptr/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nullptr/api.py b/nullptr/api.py index 8fd56c6..ed4bb26 100644 --- a/nullptr/api.py +++ b/nullptr/api.py @@ -31,7 +31,7 @@ class Api: def request(self, method, path, data=None, need_token=True, params={}): try: return self.request_once(method, path, data, need_token, params) - except ApiLimitError: + except (ApiLimitError, requests.exception.Timeout): print('oops, hit the limit. take a break') sleep(10) return self.request_once(method, path, data, need_token, params)