Remove f-strings because python 3.5

This commit is contained in:
redfast00 2019-02-14 19:55:55 +01:00
parent 66fd50743f
commit ff0940a5af
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C

View file

@ -156,9 +156,9 @@ def random_quote():
matches = models.Quote.query.filter(models.Quote.quote.contains(text_contains)).all() matches = models.Quote.query.filter(models.Quote.quote.contains(text_contains)).all()
if matches: if matches:
selected_quote = random.choice(matches) selected_quote = random.choice(matches)
response = f'{selected_quote.quote}' response = selected_quote.quote
return mattermost_response(response) return mattermost_response(response)
return mattermost_response(f'No quotes found matching "{text_contains}"', ephemeral=True) return mattermost_response('No quotes found matching "{}"'.format(text_contains), ephemeral=True)
@app.route('/', methods=['GET']) @app.route('/', methods=['GET'])