mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-04 15:43:28 +00:00
Fix loading old configs with version numbers
This commit is contained in:
parent
2909e285fc
commit
b3a3b9e4f1
@ -312,18 +312,12 @@ class Config(object):
|
||||
try:
|
||||
self.__format_version = int(data.readline())
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
try:
|
||||
self.__file_version = int(data.readline())
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
|
||||
if not self.__format_version:
|
||||
data.seek(0)
|
||||
self.__format_version = 1
|
||||
self.__file_version = 1
|
||||
else:
|
||||
try:
|
||||
self.__file_version = int(data.readline())
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
fdata = data.read()
|
||||
data.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user