mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 15:38:43 +00:00
Fix loading config files on Windows
This commit is contained in:
parent
cb524c3590
commit
ad322aabd1
1 changed files with 2 additions and 2 deletions
|
@ -237,7 +237,7 @@ class Config(object):
|
||||||
if not filename:
|
if not filename:
|
||||||
filename = self.__config_file
|
filename = self.__config_file
|
||||||
try:
|
try:
|
||||||
self.__config.update(pickle.load(open(filename, "rb")))
|
self.__config.update(pickle.load(open(filename, "r")))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.warning("Unable to load config file: %s", filename)
|
log.warning("Unable to load config file: %s", filename)
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ class Config(object):
|
||||||
# Check to see if the current config differs from the one on disk
|
# Check to see if the current config differs from the one on disk
|
||||||
# We will only write a new config file if there is a difference
|
# We will only write a new config file if there is a difference
|
||||||
try:
|
try:
|
||||||
if self.__config == pickle.load(open(filename, "rb")):
|
if self.__config == pickle.load(open(filename, "r")):
|
||||||
# The config has not changed so lets just return
|
# The config has not changed so lets just return
|
||||||
self.__save_timer = None
|
self.__save_timer = None
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue