Skip to content

Commit

Permalink
Merge pull request #1333 from cglewis/master
Browse files Browse the repository at this point in the history
check if 'data' exists in the response
  • Loading branch information
cglewis authored Sep 17, 2019
2 parents 6ae72d1 + b3ff3b7 commit 9fd65fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion poseidon/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,9 @@ def process(self):
self.logger.debug(
'Faucet event: {0}'.format(self.faucet_event))
elif found_work:
ml_returns = self.format_rabbit_message(item)['data']
msg = self.format_rabbit_message(item)
if 'data' in msg:
ml_returns = msg['data']
if ml_returns:
self.logger.info(
'ML results: {0}'.format(ml_returns))
Expand Down

0 comments on commit 9fd65fd

Please sign in to comment.