Fix loading old configs with version numbers

This commit is contained in:
Andrew Resch 2009-07-06 06:38:06 +00:00
parent 2909e285fc
commit b3a3b9e4f1
1 changed files with 5 additions and 11 deletions

View File

@ -312,19 +312,13 @@ class Config(object):
try:
self.__format_version = int(data.readline())
except ValueError:
pass
data.seek(0)
else:
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
fdata = data.read()
data.close()