diff --git a/.gitignore b/.gitignore index 970302f..a366949 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ pp dist build connectrum.egg-info +.idea \ No newline at end of file diff --git a/connectrum/client.py b/connectrum/client.py index 6da08fd..430e4db 100644 --- a/connectrum/client.py +++ b/connectrum/client.py @@ -59,7 +59,7 @@ def _connection_lost(self, protocol): return self.protocol = None - logger.warn("Electrum server connection lost") + logger.warning("Electrum server connection lost") for (_, fut) in self.inflight.values(): fut.set_exception(ElectrumErrorResponse("Electrum server connection lost")) diff --git a/connectrum/findall.py b/connectrum/findall.py index c19a5c1..b6ef9cc 100644 --- a/connectrum/findall.py +++ b/connectrum/findall.py @@ -109,7 +109,7 @@ async def reconnect(self, **kwargs): # Trigger an event that may cascade to a client_connect. # Don't continue until a client_connect occurs, which may be never. - logger.warn("Disconnected (will reconnect)") + logger.warning("Disconnected (will reconnect)") # Note that we're not in a coroutine, so we don't have access # to await and asyncio.sleep diff --git a/connectrum/protocol.py b/connectrum/protocol.py index 5e06955..9f05436 100644 --- a/connectrum/protocol.py +++ b/connectrum/protocol.py @@ -33,7 +33,7 @@ def data_received(self, data): if not line: continue try: - msg = line.decode('utf-8', "error").strip() + msg = line.decode('utf-8', "strict").strip() except UnicodeError as exc: logger.exception("Encoding issue on %r" % line) self.connection_lost(exc)