From 30efe143fe60e9b31e3d12288035eb52abe2c91b Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 30 May 2009 01:32:25 +0000 Subject: [PATCH] Catch exception when trying to open config file --- deluge/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deluge/config.py b/deluge/config.py index 3141d01f2..eb4631028 100644 --- a/deluge/config.py +++ b/deluge/config.py @@ -281,7 +281,13 @@ class Config(object): """ if not filename: filename = self.__config_file - data = open(filename, "rb") + + try: + data = open(filename, "rb") + except IOError, e: + log.warning("Unable to open config file %s: %s", filename, e) + return + try: self.__format_version = int(data.readline()) except ValueError: