X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/42651c00f2a66cefa8d3a679b97edc1c0aca8418..49d564d448e70875b1e89875e31a34af2e49e4ba:/forum/modules/ui.py 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'