Improve pickle knownnodes error handling

- Fixes #1333 (untested)
This commit is contained in:
Peter Šurda 2018-08-05 09:07:31 +02:00
parent 62024ca7e9
commit b0446ab4ab
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -98,7 +98,7 @@ def readKnownNodes():
except ValueError:
source.seek(0)
pickle_deserialize_old_knownnodes(source)
except (IOError, OSError, KeyError):
except (IOError, OSError, KeyError, EOFError):
logger.debug(
'Failed to read nodes from knownnodes.dat', exc_info=True)
createDefaultKnownNodes()