8000 Correct emit_log_topic.py · jw0201/rabbitmq-tutorials@d04a093 · GitHub
[go: up one dir, main page]

Skip to content

Commit d04a093

Browse files
author
Brian Stajkowski
committed
Correct emit_log_topic.py
Sys.argv will always be greater than 1, but in the instance where the severity is supplied it would be greather than 2. Closes rabbitmq#110
1 parent 56e7678 commit d04a093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/emit_log_topic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
channel.exchange_declare(exchange='topic_logs',
1010
exchange_type='topic')
1111

12-
routing_key = sys.argv[1] if len(sys.argv) > 1 else 'anonymous.info'
12+
routing_key = sys.argv[1] if len(sys.argv) > 2 else 'anonymous.info'
1313
message = ' '.join(sys.argv[2:]) or 'Hello World!'
1414
channel.basic_publish(exchange='topic_logs',
1515
routing_key=routing_key,

0 commit comments

Comments
 (0)
0