Author: andar
Revision: 5461
Log:
Fix loading old configs with version numbers
Diff:
Modified: trunk/deluge/config.py
===================================================================
--- trunk/deluge/config.py 2009-07-06 06:29:45 UTC (rev 5460)
+++ trunk/deluge/config.py 2009-07-06 06:38:06 UTC (rev 5461)
@@ -312,18 +312,12 @@
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()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---