Skip to content

Commit a9242f6

Browse files
committed
fix mypy warning that topic might be None
Signed-off-by: Zack Koppert <[email protected]>
1 parent 9d92633 commit a9242f6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crawler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323

2424
# Set the topic
2525
topic = os.getenv("TOPIC")
26+
if not topic:
27+
raise ValueError("TOPIC environment variable not set")
28+
2629
# If multiple topics, split topics by comma
2730
topics = [t.strip() for t in topic.split(",")]
2831
organization = os.getenv("ORGANIZATION")

0 commit comments

Comments
 (0)