Skip to content

Commit

Permalink
changed path event format
Browse files Browse the repository at this point in the history
  • Loading branch information
atiderko committed Dec 5, 2023
1 parent 47de798 commit ba1c584
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ def on_any_event(self, event: FileSystemEvent):
for launch_path, path_list in self._observed_launch_files.items():
if event.src_path in path_list:
affected_launch_files.append(launch_path)
change_event = {event.event_type: event.src_path,
'affected': affected_launch_files}
change_event = {"eventType": event.event_type,
"srcPath": event.src_path,
"affected": affected_launch_files}
Log.debug(
f"{self.__class__.__name__}: observed change {event.event_type} on {event.src_path}")
self.publish_to('ros.path.changed', change_event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ def on_any_event(self, event: FileSystemEvent):
if event.src_path in path_list:
affected_launch_files.append(launch_path)
change_event = {
event.event_type: event.src_path,
"eventType": event.event_type,
"srcPath": event.src_path,
"affected": affected_launch_files,
}
Log.debug("observed change %s on %s" % (event.event_type, event.src_path))
Expand Down

0 comments on commit ba1c584

Please sign in to comment.