Skip to content

Commit b5a1e12

Browse files
committed
remove : only in /:list (#212)
1 parent 36c08be commit b5a1e12

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/adapter/cmd.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,13 @@ def _get_command(self, topic, request_options=None):
133133
# Replace all non (alphanumeric, '-', ':') chars with Spaces to delimit args to oeis.sh
134134
if topic.startswith("oeis/"):
135135
topic = topic[5:]
136-
topic = re.sub('[^a-zA-Z0-9-:]+', ' ', topic)
136+
137+
suffix = ""
138+
if topic.endswith("/:list"):
139+
suffix = " :list"
140+
topic = topic[:-6]
141+
142+
topic = re.sub('[^a-zA-Z0-9-:]+', ' ', topic) + suffix
137143

138144
return cmd + [topic]
139145

0 commit comments

Comments
 (0)