diff options
author | Daniel <quite@hack.org> | 2012-03-02 19:28:30 +0100 |
---|---|---|
committer | Daniel <quite@hack.org> | 2012-03-02 21:07:02 +0100 |
commit | 6618a763c04243f028d3d14d07da526f911f7ed4 (patch) | |
tree | 78923a4ec3850587270d78fc4d57e92f63af74dd | |
parent | f5bd6371a550a8bcbfc383de591aa9a46094abcf (diff) |
Nicer than try--except
-rw-r--r-- | alot/db.py | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -511,9 +511,7 @@ class Thread(object): aname = settings.get('thread_authors_me') if not aname: aname = aaddress - try: - authorslist.index(aname) - except ValueError: + if not aname in authorslist: authorslist.append(aname) return ', '.join(authorslist) else: |