Skip to content

Commit

Permalink
[jsk_robot_startup] Combine two if to one
Browse files Browse the repository at this point in the history
  • Loading branch information
tkmtnt7000 committed Dec 9, 2022
1 parent d7d1bd6 commit 6127281
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions jsk_robot_common/jsk_robot_startup/scripts/smach_to_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,13 @@ def _status_cb(self, msg):
else:
self.smach_state_list[caller_id].append(status_dict)

if self.send_every_transition:
if (self.use_google_chat
and not self.smach_state_list[caller_id] is None):
rospy.loginfo("Send every transition called")
self._send_google_chat(
self.smach_state_subject[caller_id], [status_dict])
# send notification every transition
if (self.send_every_transition
and self.use_google_chat
and not self.smach_state_list[caller_id] is None):
rospy.loginfo("Send every transition called")
self._send_google_chat(
self.smach_state_subject[caller_id], [status_dict])

# If we received END/FINISH status, send email, etc...
if status_str in ["END", "FINISH", "FINISH-SUCCESS", "FINISH-FAILURE"]:
Expand Down

0 comments on commit 6127281

Please sign in to comment.