From 674a5ea3ae34558422e22d7b43bae7032b2b7cd7 Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 23 May 2011 12:45:12 +0000 Subject: [PATCH] undoing the changes made in commit #1045, could cause null pointer exceptions git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1046 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/modules/ui.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/forum/modules/ui.py b/forum/modules/ui.py index 114885b..2694110 100644 --- a/forum/modules/ui.py +++ b/forum/modules/ui.py @@ -11,19 +11,13 @@ class Registry(list): def find_by_name(self, name): for i in self: - try: - if i.name and (i.name == name): - return i - except AttributeError: - pass + if i.name and (i.name == name): + return i def remove_by_name(self, name): for i, r in enumerate(self): - try: - if r.name and (r.name == name): - return self.pop(i) - except AttributeError: - pass + if r.name and (r.name == name): + return self.pop(i) HEAD_CONTENT = 'HEAD_CONTENT' -- 2.39.5