aboutsummaryrefslogtreecommitdiff
path: root/ingrex
diff options
context:
space:
mode:
Diffstat (limited to 'ingrex')
-rwxr-xr-xingrex/intel.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ingrex/intel.py b/ingrex/intel.py
index 506c6bc..2cc4e7f 100755
--- a/ingrex/intel.py
+++ b/ingrex/intel.py
@@ -43,14 +43,14 @@ class Intel(object):
43 count = 0 43 count = 0
44 while count < 3: 44 while count < 3:
45 try: 45 try:
46 request = self.session.post(url, data=json.dumps(payload), headers=self.headers, timeout=600) 46 request = self.session.post(url, data=json.dumps(payload), headers=self.headers, timeout=(10, 60))
47 return request.json()['result'] 47 return request.json()['result']
48 except requests.ConnectionError: 48 except requests.ConnectionError:
49 raise IntelError 49 raise IntelException
50 except Exception: 50 except Exception:
51 count += 1 51 count += 1
52 continue 52 continue
53 raise CookieError 53 raise CookieException
54 54
55 def fetch_msg(self, mints=-1, maxts=-1, reverse=False, tab='all'): 55 def fetch_msg(self, mints=-1, maxts=-1, reverse=False, tab='all'):
56 "fetch message from Ingress COMM, tab can be 'all', 'faction', 'alerts'" 56 "fetch message from Ingress COMM, tab can be 'all', 'faction', 'alerts'"
@@ -133,12 +133,12 @@ class Intel(object):
133 return self.fetch(url, payload) 133 return self.fetch(url, payload)
134 134
135 135
136class IntelError(BaseException): 136class IntelException(BaseException):
137 """Intel Error""" 137 """Intel Error"""
138 pass 138 pass
139 139
140 140
141class CookieError(IntelError): 141class CookieException(IntelException):
142 """Intel Error""" 142 """Intel Error"""
143 pass 143 pass
144 144
Powered by cgit v1.2.3 (git 2.41.0)