From b3a3b9e4f11d17652269a888fde72f518861db19 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 6 Jul 2009 06:38:06 +0000 Subject: [PATCH] Fix loading old configs with version numbers --- deluge/config.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/deluge/config.py b/deluge/config.py index 2355c72a4..336df7f9b 100644 --- a/deluge/config.py +++ b/deluge/config.py @@ -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()