Add new Exception type

This commit is contained in:
blitzmann
2018-05-06 13:04:02 -04:00
parent 7d8d87662b
commit 789c3b869a

View File

@@ -35,6 +35,9 @@ if not os.path.exists(cache_path):
file_cache = FileCache(cache_path)
class EsiException(Exception):
pass
class Servers(Enum):
TQ = 0
SISI = 1
@@ -170,7 +173,7 @@ class Esi(object):
def check_response(self, resp):
if resp.status != 200:
raise Exception(resp.status)
raise EsiException(resp.status)
return resp
@staticmethod