3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-23 18:54:05 +01:00

relay: catch OSError too when loading DB

This commit is contained in:
James Lu 2016-04-01 18:31:53 -07:00
parent d21344342d
commit 3a8b0aa123

View File

@ -156,8 +156,8 @@ def loadDB():
try:
with open(dbname, "rb") as f:
db = pickle.load(f)
except (ValueError, IOError):
log.exception("Relay: failed to load links database %s"
except (ValueError, IOError, OSError):
log.info("Relay: failed to load links database %s"
", creating a new one in memory...", dbname)
db = {}