Skip to content
Snippets Groups Projects
Commit e02dd3ea authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Use 'return', not 'yield'

Single line
parent 809e2eb9
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@ class Lart(BotPlugin):
if len(args) < 2:
return "**Usage**: !lart edit <id> <pattern>"
if '{}' not in args:
yield "**Error**: '{}' not in message"
return "**Error**: '{}' not in message"
try:
i = int(args[0])
......@@ -101,6 +101,6 @@ class Lart(BotPlugin):
self.larts[i] = text
return "Changed lart {} to '{}'".format(i, text)
except IndexError:
yield "**Error**: Lart {} not in database".format(i)
return "**Error**: Lart {} not in database".format(i)
except ValueError:
yield "**Error**: ID given couldn't be converted to an integer"
return "**Error**: ID given couldn't be converted to an integer"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment