Skip to content

Commit

Permalink
exchange is being truncated when it is a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Nov 6, 2023
1 parent e811134 commit e78625c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sarracenia/flowcb/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ def _messagePostStr(self,msg):
return msg.dumps()

s = "to "
if ('exchange' in msg) and ('post_topic' in msg) and not msg['post_topic'].startswith(msg['exchange'][0]):
s+= f"exchange: {msg['exchange'][0]} "
if 'exchange' in msg:
if ('post_topic' in msg) and not msg['post_topic'].startswith(msg['exchange'][0]):
if type(msg['exchange']) is list:
s+= f"exchange: {msg['exchange'][0]} "
else:
s+= f"exchange: {msg['exchange']} "
if 'post_topic' in msg:
s+= f"topic: {msg['post_topic']} "

Expand Down

0 comments on commit e78625c

Please sign in to comment.