mirror of https://github.com/nucypher/nucypher.git
Merge pull request #2762 from derekpierre/no-bytes
Don't put bytes directly into log - instead write as hexpull/2766/head
commit
1ae99e1350
|
@ -0,0 +1 @@
|
||||||
|
Stop writing bytes to log file which causes exceptions - instead write the hex representation.
|
|
@ -822,7 +822,7 @@ class Learner:
|
||||||
# TODO: Bucket separately and report.
|
# TODO: Bucket separately and report.
|
||||||
unresponsive_nodes.add(current_teacher) # This does nothing.
|
unresponsive_nodes.add(current_teacher) # This does nothing.
|
||||||
self.known_nodes.mark_as(current_teacher.InvalidNode, current_teacher)
|
self.known_nodes.mark_as(current_teacher.InvalidNode, current_teacher)
|
||||||
self.log.warn(f"Teacher {str(current_teacher)} is invalid: {bytes(current_teacher)}:{e}.")
|
self.log.warn(f"Teacher {str(current_teacher)} is invalid (hex={bytes(current_teacher).hex()}):{e}.")
|
||||||
self.suspicious_activities_witnessed['vladimirs'].append(current_teacher)
|
self.suspicious_activities_witnessed['vladimirs'].append(current_teacher)
|
||||||
return
|
return
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
|
@ -832,11 +832,13 @@ class Learner:
|
||||||
return RELAX
|
return RELAX
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
f"Unhandled error while learning from {str(current_teacher)}: {bytes(current_teacher)}:{e}.")
|
f"Unhandled error while learning from {str(current_teacher)} "
|
||||||
|
f"(hex={bytes(current_teacher).hex()}):{e}.")
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
f"Unhandled error while learning from {str(current_teacher)}: {bytes(current_teacher)}:{e}.") # To track down 2345 / 1698
|
f"Unhandled error while learning from {str(current_teacher)} "
|
||||||
|
f"(hex={bytes(current_teacher).hex()}):{e}.") # To track down 2345 / 1698
|
||||||
raise
|
raise
|
||||||
finally:
|
finally:
|
||||||
# Is cycling happening in the right order?
|
# Is cycling happening in the right order?
|
||||||
|
|
Loading…
Reference in New Issue