From c04ae40cf1428a89995d8e8f699027101112b33a Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 23 Oct 2007 03:26:28 +0000 Subject: [PATCH] catch attributeerror to fix upgrade issue --- src/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core.py b/src/core.py index 964414fc3..c5acf1bdc 100644 --- a/src/core.py +++ b/src/core.py @@ -315,9 +315,12 @@ class Manager: # Save the uploaded data from this session to the existing upload memory for unique_ID in self.unique_IDs.keys(): # self.get_core_torrent_state purposefully not cached. - self.unique_IDs[unique_ID].uploaded_memory = \ + try: + self.unique_IDs[unique_ID].uploaded_memory = \ self.unique_IDs[unique_ID].initial_uploaded_memory + \ self.get_core_torrent_state(unique_ID, False)['total_upload'] + except AttributeError: + self.unique_IDs[unique_ID].initial_uploaded_memory = 0 # Preference management functions