From 00235a0288d5df3acc139e5cefe1c964ac6d5a4c Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Fri, 7 Jan 2022 11:23:59 +0000 Subject: [PATCH] better error message & minor comment --- src/Peer/Peer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Peer/Peer.py b/src/Peer/Peer.py index 03cc1f47..bbbf9501 100644 --- a/src/Peer/Peer.py +++ b/src/Peer/Peer.py @@ -157,10 +157,11 @@ class Peer(object): for retry in range(1, 4): # Retry 3 times try: if not self.connection: + # this is redundant, already established that self.connection is present raise Exception("No connection found") res = self.connection.request(cmd, params, stream_to) if not res: - raise Exception("Send error") + raise Exception("Send error : result is empty") if "error" in res: self.log("%s error: %s" % (cmd, res["error"])) self.onConnectionError("Response error")