more cleaning up - removing unneeded white spaces

This commit is contained in:
Marcos Pinto 2007-07-14 22:22:37 +00:00
parent 70b6e40a55
commit 78d8d116cc
5 changed files with 48 additions and 53 deletions

View File

@ -91,8 +91,7 @@ STATE_MESSAGES = ( N_("Queued"),
N_("Downloading"), N_("Downloading"),
N_("Finished"), N_("Finished"),
N_("Seeding"), N_("Seeding"),
N_("Allocating") N_("Allocating"))
)
# Exceptions # Exceptions
class DelugeError(Exception): class DelugeError(Exception):
@ -652,8 +651,7 @@ class Manager:
# Efficient: use a saved state, if it hasn't expired yet # Efficient: use a saved state, if it hasn't expired yet
def get_core_torrent_state(self, unique_ID, efficiently=True): def get_core_torrent_state(self, unique_ID, efficiently=True):
if unique_ID not in self.saved_core_torrent_states.keys(): if unique_ID not in self.saved_core_torrent_states.keys():
self.saved_core_torrent_states[unique_ID] = cached_data(deluge_core.get_torrent_state, self.saved_core_torrent_states[unique_ID] = cached_data(deluge_core.get_torrent_state, unique_ID)
unique_ID)
return self.saved_core_torrent_states[unique_ID].get(efficiently) return self.saved_core_torrent_states[unique_ID].get(efficiently)
@ -862,4 +860,3 @@ class Manager:
def replace_trackers(self, unique_ID, trackers): def replace_trackers(self, unique_ID, trackers):
return deluge_core.replace_trackers(unique_ID, trackers) return deluge_core.replace_trackers(unique_ID, trackers)

View File

@ -331,5 +331,3 @@ def show_directory_chooser_dialog(parent=None, title=None):
result = None result = None
chooser.destroy() chooser.destroy()
return result return result

View File

@ -99,6 +99,7 @@ DEFAULT_PREFS = {
"window_x_pos" : 0, "window_x_pos" : 0,
"window_y_pos" : 0, "window_y_pos" : 0,
} }
class Preferences: class Preferences:
def __init__(self, filename=None, global_defaults=True, defaults=None): def __init__(self, filename=None, global_defaults=True, defaults=None):
self.mapping = {} self.mapping = {}
@ -177,4 +178,3 @@ class Preferences:
def printout(self): def printout(self):
for key in self.mapping.keys(): for key in self.mapping.keys():
print key, ':', self.mapping[key] print key, ':', self.mapping[key]