From 8d2a658789d5ec546471bbe1ef71a0d6f773dff2 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Fri, 17 Oct 2008 21:36:03 +0000 Subject: [PATCH] little cleaning --- deluge/plugins/blocklist/blocklist/text.py | 2 +- deluge/ui/gtkui/addtorrentdialog.py | 2 +- deluge/ui/gtkui/mainwindow.py | 4 ++-- deluge/ui/signalreceiver.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deluge/plugins/blocklist/blocklist/text.py b/deluge/plugins/blocklist/blocklist/text.py index 9fd0a288e..480adc6bb 100644 --- a/deluge/plugins/blocklist/blocklist/text.py +++ b/deluge/plugins/blocklist/blocklist/text.py @@ -113,7 +113,7 @@ class PGZip(TextBase): def next(self): try: ret = self.reader.next() - if ret == False: + if not ret: # This bit is repeated below and could be moved into a # new procedure. However I'm not clear on how this # would effect tail recursion, so it remains diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index 9a4d60cb4..a152284b8 100644 --- a/deluge/ui/gtkui/addtorrentdialog.py +++ b/deluge/ui/gtkui/addtorrentdialog.py @@ -444,7 +444,7 @@ class AddTorrentDialog(component.Component): files_list = [] for file_dict in self.files[torrent_id]: - if file_dict["download"] == False: + if not file_dict["download"]: files_list.append(0) else: files_list.append(1) diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py index 1532466d7..369c724bb 100644 --- a/deluge/ui/gtkui/mainwindow.py +++ b/deluge/ui/gtkui/mainwindow.py @@ -144,13 +144,13 @@ class MainWindow(component.Component): h = self.config["window_height"] self.window.move(x, y) self.window.resize(w, h) - if self.config["window_maximized"] == True: + if self.config["window_maximized"]: self.window.maximize() self.vpaned.set_position( self.config["window_height"] - self.config["window_pane_position"]) def on_window_configure_event(self, widget, event): - if self.config["window_maximized"] == False and self.visible: + if not self.config["window_maximized"] and self.visible: self.config.set("window_x_pos", self.window.get_position()[0]) self.config.set("window_y_pos", self.window.get_position()[1]) self.config.set("window_width", event.width) diff --git a/deluge/ui/signalreceiver.py b/deluge/ui/signalreceiver.py index e5954758c..87e81704e 100644 --- a/deluge/ui/signalreceiver.py +++ b/deluge/ui/signalreceiver.py @@ -62,7 +62,7 @@ class SignalReceiver(ThreadingMixIn, SimpleXMLRPCServer.SimpleXMLRPCServer): def start_server(self, port=None): # Setup the xmlrpc server host = "127.0.0.1" - if self.remote == True: + if self.remote: host = "" server_ready = False