Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Convert list index out of range check to try/except

  • Loading branch information...
commit 631b9e0c8761fc491bfb171aced1ad817ebd1cb1 1 parent 05c6e34
Aaron Toponce authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 email-0mq.py
8 email-0mq.py
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.