[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7f14a3cb9e
commit
32547397c3
@ -812,12 +812,12 @@ class GoCQHttp(BaseClient):
|
|||||||
except aiocqhttp.Error as ex:
|
except aiocqhttp.Error as ex:
|
||||||
api_ex = CoolQAPIFailureException(
|
api_ex = CoolQAPIFailureException(
|
||||||
"CoolQ HTTP API encountered an error!\nStatus Code:{} Return Code:{}".format(
|
"CoolQ HTTP API encountered an error!\nStatus Code:{} Return Code:{}".format(
|
||||||
ex.status_code if hasattr(ex, 'status_code') else "Unknown",
|
ex.status_code if hasattr(ex, "status_code") else "Unknown",
|
||||||
ex.retcode if hasattr(ex, 'retcode') else "Unknown"
|
ex.retcode if hasattr(ex, "retcode") else "Unknown",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
api_ex.status_code = ex.status_code if hasattr(ex, 'status_code') else None
|
api_ex.status_code = ex.status_code if hasattr(ex, "status_code") else None
|
||||||
api_ex.retcode = ex.retcode if hasattr(ex, 'retcode') else None
|
api_ex.retcode = ex.retcode if hasattr(ex, "retcode") else None
|
||||||
raise api_ex
|
raise api_ex
|
||||||
else:
|
else:
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user