Skip to content

Commit

Permalink
bug(job_modules): 1 module in tuple failed, format error string better
Browse files Browse the repository at this point in the history
  • Loading branch information
wiwichips committed Sep 8, 2024
1 parent 72c721a commit 11a1595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dcp/api/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ def _before_exec(self, *args, **kwargs):
job_fs = bytearray(self.fs.to_gzip_tar())
env_args = convert_env_to_arguments(self.env)

# convert single string to list of one string
if isinstance(self.modules, str):
self.modules = [self.modules]

modules_pyodide = pyodide_full_module_dependencies(self.modules)

#modules_dcp_packages = convert_modules_to_requires(modules_pyodide)
Expand Down
2 changes: 1 addition & 1 deletion dcp/api/job_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def pyodide_full_module_dependencies(modules):

for module in modules:
if not module in repodata['packages']:
raise Exception('Usage of unsupported module "${module}". "${module}" is currently not supported by the Pyodide Worktime.')
raise Exception(f'Usage of unsupported module "{module}". "{module}" is currently not supported by the Pyodide Worktime.')
dependencies.extend(repodata['packages'][module]['depends'])

dependencies = list(set(dependencies))
Expand Down

0 comments on commit 11a1595

Please sign in to comment.