1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

Another check if a given topic has just the :list and rosetta/

This commit is contained in:
fedeb
2020-11-07 21:15:26 +01:00
parent 2c9185d835
commit f4cd21e4e0
+3
View File
@@ -119,6 +119,9 @@ class Router(object):
#Here we remove the special cases
if ":list" in topic_list: topic_list.remove(":list")
if "rosetta/" in topic_list: topic_list.remove("rosetta/")
#Here we still check that topic_list in not empty
if not topic_list:
return prefix
random_topic = random.choice(topic_list)
return prefix + random_topic