Skip to content

Commit cd809d0

Browse files
committed
Exercise template check before running
1 parent 3fc453f commit cd809d0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

manager/manager/manager.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,15 @@ def add_frequency_control(self, code):
190190

191191
def on_run_application(self, event):
192192
application_configuration = event.kwargs.get('data', {})
193-
application_file = application_configuration['template']
193+
application_file_path = application_configuration['template']
194194
exercise_id = application_configuration['exercise_id']
195195
code = application_configuration['code']
196-
196+
197+
if "noetic" in str(self.ros_version):
198+
application_file = application_file_path + '/ros1_noetic/exercise.py'
199+
else:
200+
application_file = application_file_path + '/ros2_humble/exercise.py'
201+
197202
errors = self.linter.evaluate_code(code, exercise_id)
198203
if errors == "":
199204
code = self.add_frequency_control(code)

0 commit comments

Comments
 (0)