Fix RPCError not setting the x attribute
This commit is contained in:
parent
46bf382480
commit
59b43af02e
@ -40,6 +40,11 @@ class RPCError(Exception):
|
||||
'caused by "{}"'.format(rpc_name)
|
||||
))
|
||||
|
||||
try:
|
||||
self.x = int(x)
|
||||
except (ValueError, TypeError):
|
||||
self.x = x
|
||||
|
||||
if is_unknown:
|
||||
with open("unknown_errors.txt", "a", encoding="utf-8") as f:
|
||||
f.write("{}\t{}\t{}\n".format(datetime.now(), x, rpc_name))
|
||||
|
Loading…
Reference in New Issue
Block a user