[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2022-08-18 09:07:42 +00:00 committed by XYenon
parent 7f14a3cb9e
commit 32547397c3

View File

@ -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