Skip to content

Commit

Permalink
Improving calc plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Iury O. G. Figueiredo committed May 19, 2017
1 parent 073999b commit 5ccdef9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ameliabot/plugins/calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, server, appid):
@regcmd('@calc (?P<exp>.+)$')
def calculate(self, server, nick, user, host, target, msg, exp):
for pod in self.client.query(exp):
if pod.text:
if getattr(pod, 'text', None):
send_lines(server, target,
pod.text.encode('utf-8'))

Expand All @@ -46,3 +46,4 @@ def calculate(self, server, nick, user, host, target, msg, exp):




0 comments on commit 5ccdef9

Please sign in to comment.