mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Fix RPCError not setting the x attribute
This commit is contained in:
parent
46bf382480
commit
59b43af02e
1 changed files with 5 additions and 0 deletions
|
|
@ -40,6 +40,11 @@ class RPCError(Exception):
|
||||||
'caused by "{}"'.format(rpc_name)
|
'caused by "{}"'.format(rpc_name)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.x = int(x)
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
self.x = x
|
||||||
|
|
||||||
if is_unknown:
|
if is_unknown:
|
||||||
with open("unknown_errors.txt", "a", encoding="utf-8") as f:
|
with open("unknown_errors.txt", "a", encoding="utf-8") as f:
|
||||||
f.write("{}\t{}\t{}\n".format(datetime.now(), x, rpc_name))
|
f.write("{}\t{}\t{}\n".format(datetime.now(), x, rpc_name))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue