Skip to content

Commit f4cd21e

Browse files
committed
Another check if a given topic has just the :list and rosetta/
1 parent 2c9185d commit f4cd21e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/routing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ def __select_random_topic(prefix,topic_list):
119119
#Here we remove the special cases
120120
if ":list" in topic_list: topic_list.remove(":list")
121121
if "rosetta/" in topic_list: topic_list.remove("rosetta/")
122+
#Here we still check that topic_list in not empty
123+
if not topic_list:
124+
return prefix
122125
random_topic = random.choice(topic_list)
123126
return prefix + random_topic
124127

0 commit comments

Comments
 (0)