From 706ec5991e6f8c34d6a20f56283c1ba8a4515a78 Mon Sep 17 00:00:00 2001 From: "jai.s" Date: Fri, 10 Jan 2020 15:21:01 +0530 Subject: [PATCH] Updated the branch by origin and added changes on the knownNodes file --- python3_requirements.txt | 8 +++++++- src/knownnodes.py | 4 ++-- src/network/bmproto.py | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/python3_requirements.txt b/python3_requirements.txt index 5709432a..1115fe09 100644 --- a/python3_requirements.txt +++ b/python3_requirements.txt @@ -1,15 +1,21 @@ +astroid==2.3.3 certifi==2019.9.11 chardet==3.0.4 docutils==0.15.2 idna==2.8 +isort==4.3.21 Kivy==1.11.1 Kivy-Garden==0.1.4 -kivymd==0.100.2 +git+https://github.com/HeaTTheatR/KivyMD.git +lazy-object-proxy==1.4.3 +mccabe==0.6.1 Pillow==6.1.0 pkg-resources==0.0.0 pydenticon==0.3.1 Pygments==2.4.2 +pylint==2.4.4 qrcode==6.1 requests==2.22.0 six==1.12.0 +typed-ast==1.4.0 urllib3==1.25.6 diff --git a/src/knownnodes.py b/src/knownnodes.py index 08b71e57..c1d56ccc 100644 --- a/src/knownnodes.py +++ b/src/knownnodes.py @@ -114,14 +114,14 @@ def createDefaultKnownNodes(): def readKnownNodes(): """Load knownnodes from filesystem""" try: - with open(state.appdata + 'knownnodes.dat', 'r') as source: + with open(state.appdata + 'knownnodes.dat', 'rb') as source: with knownNodesLock: try: json_deserialize_knownnodes(source) except ValueError: source.seek(0) pickle_deserialize_old_knownnodes(source) - except (IOError, OSError, KeyError, EOFError): + except (IOError, OSError, KeyError, EOFError,pickle.UnpicklingError): logger.debug( 'Failed to read nodes from knownnodes.dat', exc_info=True) createDefaultKnownNodes() diff --git a/src/network/bmproto.py b/src/network/bmproto.py index 66950380..dfb57092 100644 --- a/src/network/bmproto.py +++ b/src/network/bmproto.py @@ -472,7 +472,7 @@ class BMProto(AdvancedDispatcher, ObjectTracker): addresses = self._decode_addr() # pylint: disable=redefined-outer-name for i in addresses: seenTime, stream, _, ip, port = i - decodedIP = protocol.checkIPAddress(ip) + decodedIP = protocol.checkIPAddress(bytes(ip)) if stream not in state.streamsInWhichIAmParticipating: continue if (