File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
repo2docker/buildpacks/conda Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11"""BuildPack for conda environments"""
22import os
33import re
4+ from collections import Mapping
45
56from ruamel .yaml import YAML
67
@@ -139,8 +140,8 @@ def python_version(self):
139140 # check if the env file is empty, if so instantiate an empty dictionary.
140141 if env is None :
141142 env = {}
142- # check if the env file has a dictionary not a list or other data structure.
143- if not isinstance (env , dict ):
143+ # check if the env file provided a dick-like thing not a list or other data structure.
144+ if not isinstance (env , Mapping ):
144145 raise TypeError ("environment.yml should contain a dictionary. Got %r" % type (env ))
145146 for dep in env .get ('dependencies' , []):
146147 if not isinstance (dep , str ):
You can’t perform that action at this time.
0 commit comments