From b0446ab4ab08def782b7f6fb6b7ca5c8d3d7f0c0 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sun, 5 Aug 2018 09:07:31 +0200 Subject: [PATCH] Improve pickle knownnodes error handling - Fixes #1333 (untested) --- src/knownnodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/knownnodes.py b/src/knownnodes.py index 5ffd65d1..ac2d668c 100644 --- a/src/knownnodes.py +++ b/src/knownnodes.py @@ -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()