diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-07-06 13:09:20 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-07-06 13:09:20 +0200 |
commit | 9a74beba9a6fc827482834fadbab8d2e20fa1acb (patch) | |
tree | 1812a7dc232f7052d69a3acdba23d1bca4809b1e /alot/addressbook/__init__.py | |
parent | 7a6c7ac286b0ae1c218c1c9782d2ede2023cc908 (diff) |
Remove broad except
The protected code only calls re.match and list.append so it should
never fail (and if it still fails it should not be silenced).
Diffstat (limited to 'alot/addressbook/__init__.py')
-rw-r--r-- | alot/addressbook/__init__.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/alot/addressbook/__init__.py b/alot/addressbook/__init__.py index cda2d8bd..fbd95a99 100644 --- a/alot/addressbook/__init__.py +++ b/alot/addressbook/__init__.py @@ -36,10 +36,7 @@ class AddressBook(object): res = [] query = '.*%s.*' % query for name, email in self.get_contacts(): - try: - if re.match(query, name, self.reflags) or \ - re.match(query, email, self.reflags): - res.append((name, email)) - except: - pass + if re.match(query, name, self.reflags) or \ + re.match(query, email, self.reflags): + res.append((name, email)) return res |