Skip to content

Commit

Permalink
Convert list index out of range check to try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
atoponce committed Sep 4, 2012
1 parent 05c6e34 commit 631b9e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions email-0mq.py
Expand Up @@ -23,12 +23,12 @@
f.write(msg)
f.close()

# Ignore client events that aren't PUBLIC
if not y['tags'][3]:
try:
nick = base64.b64decode(y['tags'][3])
nick = re.sub('^nick_','',nick)
except:
continue

nick = base64.b64decode(y['tags'][3])
nick = re.sub('^nick_','',nick)
message = base64.b64decode(y['message'])

# Change your email-to-sms address as provided by your mobile provider
Expand Down

0 comments on commit 631b9e0

Please sign in to comment.