TheYoBots commited on
Commit
f42ef53
·
1 Parent(s): 76bf9bd

Update lishogi.py

Browse files
Files changed (1) hide show
  1. lishogi.py +0 -4
lishogi.py CHANGED
@@ -10,8 +10,6 @@ try:
10
  except ImportError:
11
  from http.client import BadStatusLine as RemoteDisconnected
12
 
13
- import backoff
14
-
15
  ENDPOINTS = {
16
  "profile": "/api/account",
17
  "playing": "/api/account/playing",
@@ -46,7 +44,6 @@ class Lishogi():
46
  def is_final(exception):
47
  return isinstance(exception, HTTPError) and exception.response.status_code < 500
48
 
49
- @backoff.on_exception(backoff.expo,
50
  (RemoteDisconnected, ConnectionError, ProtocolError, HTTPError),
51
  max_time=120,
52
  giveup=is_final)
@@ -56,7 +53,6 @@ class Lishogi():
56
  response.raise_for_status()
57
  return response.json()
58
 
59
- @backoff.on_exception(backoff.expo,
60
  (RemoteDisconnected, ConnectionError, ProtocolError, HTTPError),
61
  max_time=20,
62
  giveup=is_final)
 
10
  except ImportError:
11
  from http.client import BadStatusLine as RemoteDisconnected
12
 
 
 
13
  ENDPOINTS = {
14
  "profile": "/api/account",
15
  "playing": "/api/account/playing",
 
44
  def is_final(exception):
45
  return isinstance(exception, HTTPError) and exception.response.status_code < 500
46
 
 
47
  (RemoteDisconnected, ConnectionError, ProtocolError, HTTPError),
48
  max_time=120,
49
  giveup=is_final)
 
53
  response.raise_for_status()
54
  return response.json()
55
 
 
56
  (RemoteDisconnected, ConnectionError, ProtocolError, HTTPError),
57
  max_time=20,
58
  giveup=is_final)