dev
This commit is contained in:
@@ -10,12 +10,10 @@ from api.core.exception import ResponseException
|
||||
|
||||
|
||||
class AlterState:
|
||||
def __init__(self, value: str, token: str, charcater: Character, equVersion: str,time: int):
|
||||
self.value = value
|
||||
try:
|
||||
self.alter = get_adv_info(value)["class"]
|
||||
except Exception:
|
||||
raise ResponseException(f'无效的职业{value}')
|
||||
def __init__(self, alter: str, token: str, charcater: Character, equVersion: str,time: int):
|
||||
if alter is None:
|
||||
raise ResponseException('无效的职业')
|
||||
self.alter = alter
|
||||
self.token = token
|
||||
self.origin = self.alter.split('.')[-1]
|
||||
self.character = charcater
|
||||
|
||||
@@ -10,7 +10,6 @@ def get_redis_info(redis, key, fun,without_gzip=False):
|
||||
else:
|
||||
info = json.loads(gzip_unzip(redis.get(key)))
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
info = None
|
||||
if info is None:
|
||||
info = fun()
|
||||
|
||||
Reference in New Issue
Block a user