Skip to content

Commit

Permalink
[ip] try not to fail if ISP is not known (ie. for internal addresses)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Alfassa committed Jun 2, 2013
1 parent 1a9fc1a commit 4d0568c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def ip(willie, trigger):
if region is not '':
response += " | Region: %s" % region
isp = gi_org.org_by_name(query)
isp = re.sub('^AS\d+ ', '', isp)
if isp is not None:
isp = re.sub('^AS\d+ ', '', isp)
response += " | ISP: %s" % isp
willie.say(response)

Expand Down

0 comments on commit 4d0568c

Please sign in to comment.