From caf9d69bfcf233dc4a2a7f0d6cdcb5d87ec65b04 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 12 Jan 2011 22:47:36 +0100 Subject: [PATCH] prevent Traceback when there is an empty secret file. Fixes #6752 --- src/secrets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/secrets.py b/src/secrets.py index 17cb5b6e3..ff013d0ff 100644 --- a/src/secrets.py +++ b/src/secrets.py @@ -99,7 +99,7 @@ def load_secrets(filename): try: secrets = pickle.load(f) - except KeyError: + except (KeyError, EOFError): f.close() secrets = Secrets(filename)