return empty array instead of None when no hashtags found

This commit is contained in:
Tomáš Mládek 2019-05-15 11:43:05 +02:00
parent 6a660206c8
commit ddd1ee3616

View file

@ -230,7 +230,7 @@ class DelojzaBot:
for i, hashtag in enumerate(hashtags): for i, hashtag in enumerate(hashtags):
if "PRAS" in hashtag: if "PRAS" in hashtag:
hashtags[i] = "PRAS" hashtags[i] = "PRAS"
return hashtags return hashtags
def get_hashtags(self, message): def get_hashtags(self, message):
hashtags = self.extract_hashtags(message) hashtags = self.extract_hashtags(message)