mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
Catch exception when trying to open config file
This commit is contained in:
parent
019c78db47
commit
30efe143fe
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user