From: jordan Date: Mon, 23 May 2011 12:45:12 +0000 (+0000) Subject: undoing the changes made in commit #1045, could cause null pointer exceptions X-Git-Tag: live~267 X-Git-Url: https://git.openstreetmap.org/osqa.git/commitdiff_plain/674a5ea3ae34558422e22d7b43bae7032b2b7cd7 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 --- 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'