Skip to content

Commit

Permalink
Check dependency is string before matching (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavchenko authored Jul 31, 2024
1 parent 0bdc5ac commit be564e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nb2workflow/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def generate_dockerfile(self,
has_conda_env = True
match_spec = re.compile(r'^python[~=<> ]')
for dep in parsed_env['dependencies']:
if match_spec.match(dep):
if isinstance(dep, str) and match_spec.match(dep):
inject_python_version_str = f'echo "Using {dep}"'
break

Expand Down

0 comments on commit be564e7

Please sign in to comment.