From 5505ebdec2152ce6b1e74ec8b7309fcdd1941508 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 30 Mar 2009 11:49:20 -0400 Subject: [PATCH 1/2] Remove comprehension and replace with loop in reposition_windows(). --- pyfpdb/Hud.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index b2266213..ebf7054f 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -201,8 +201,9 @@ class Hud: self.aux_windows = [] def reposition_windows(self, *args): - if self.stat_windows != {} and len(self.stat_windows) > 0: - (x.window.move(x.x, x.y) for x in self.stat_windows.itervalues() if type(x) != int) + for w in self.stat_windows.itervalues(): + if type(w) == int: continue + w.window.move(w.x, w.y) return True def debug_stat_windows(self, *args): From f5d7764571d9b6f0acc71297c1bf557756957db7 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 30 Mar 2009 11:59:07 -0400 Subject: [PATCH 2/2] Remove another comprehension not working as expected in kill() --- pyfpdb/Hud.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index ebf7054f..cf96893f 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -197,7 +197,8 @@ class Hud: s.window.destroy() self.stat_windows = {} # also kill any aux windows - (aux.destroy() for aux in self.aux_windows) + for aux in self.aux_windows: + aux.destroy() self.aux_windows = [] def reposition_windows(self, *args):