From da81704b74c545d13b2dbd11d84c50bc51f59fc8 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 5 May 2009 22:35:25 +0000 Subject: [PATCH] remove pointless if --- deluge/ui/gtkui/edittrackersdialog.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/deluge/ui/gtkui/edittrackersdialog.py b/deluge/ui/gtkui/edittrackersdialog.py index df4cfc678..b5fef38c2 100644 --- a/deluge/ui/gtkui/edittrackersdialog.py +++ b/deluge/ui/gtkui/edittrackersdialog.py @@ -193,14 +193,13 @@ class EditTrackersDialog: # Check if there are any entries duplicate = False highest_tier = -1 - if self.liststore.iter_n_children(None) > 0: - for row in self.liststore: - tier = row[0] - if tier > highest_tier: - highest_tier = tier - if tracker == row[1]: - duplicate = True - break + for row in self.liststore: + tier = row[0] + if tier > highest_tier: + highest_tier = tier + if tracker == row[1]: + duplicate = True + break # If not a duplicate, then add it to the list if not duplicate: