Skip to content

Commit

Permalink
Exercise template check before running
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanw17 committed Feb 10, 2024
1 parent 3fc453f commit 36f61df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions manager/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,15 @@ def add_frequency_control(self, code):

def on_run_application(self, event):
application_configuration = event.kwargs.get('data', {})
application_file = application_configuration['template']
application_file_path = application_configuration['template']
exercise_id = application_configuration['exercise_id']
code = application_configuration['code']


if "noetic" in str(self.ros_version):
application_file = application_file_path + 'ros1_noetic/exercise.py'
else:
application_file = application_file_path + 'ros2_humble/exercise.py'

errors = self.linter.evaluate_code(code, exercise_id)
if errors == "":
code = self.add_frequency_control(code)
Expand Down

0 comments on commit 36f61df

Please sign in to comment.