MCPcopy Index your code
hub / github.com/pyload/pyload / check_errors

Method check_errors

module/plugins/internal/XFSAccount.py:194–232  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192 self.check_errors()
193
194 def check_errors(self):
195 self.log_info(_("Checking for link errors..."))
196
197 if not self.data:
198 self.log_warning(_("No data to check"))
199 return
200
201 m = search_pattern(self.LOGIN_BAN_PATTERN, self.data)
202 if m is not None:
203 try:
204 errmsg = m.group(1)
205
206 except (AttributeError, IndexError):
207 errmsg = m.group(0)
208
209 finally:
210 errmsg = re.sub(r'<.*?>', " ", errmsg.strip())
211
212 new_timeout = parse_time(errmsg)
213 if new_timeout > self.timeout:
214 self.timeout = new_timeout
215
216 self.fail_login(errmsg)
217
218 m = search_pattern(self.LOGIN_FAIL_PATTERN, self.data)
219 if m is not None:
220 try:
221 errmsg = m.group(1)
222
223 except (AttributeError, IndexError):
224 errmsg = m.group(0)
225
226 finally:
227 errmsg = re.sub(r'<.*?>', " ", errmsg.strip())
228
229 self.timeout = self.LOGIN_TIMEOUT
230 self.fail_login(errmsg)
231
232 self.log_info(_("No errors found"))

Callers 3

signinMethod · 0.95
handle_freeMethod · 0.45
handle_multiMethod · 0.45

Calls 6

search_patternFunction · 0.85
parse_timeFunction · 0.85
log_infoMethod · 0.80
log_warningMethod · 0.80
fail_loginMethod · 0.80
_Function · 0.50

Tested by

no test coverage detected