##// END OF EJS Templates
py: error out if a "skip" character was given with non-dict to util.dirs()...
Martin von Zweigbergk -
r42864:b5092c23 stable
parent child Browse files
Show More
@@ -3173,10 +3173,13 b' class dirs(object):'
3173 def __init__(self, map, skip=None):
3173 def __init__(self, map, skip=None):
3174 self._dirs = {}
3174 self._dirs = {}
3175 addpath = self.addpath
3175 addpath = self.addpath
3176 if safehasattr(map, 'iteritems') and skip is not None:
3176 if isinstance(map, dict) and skip is not None:
3177 for f, s in map.iteritems():
3177 for f, s in map.iteritems():
3178 if s[0] != skip:
3178 if s[0] != skip:
3179 addpath(f)
3179 addpath(f)
3180 elif skip is not None:
3181 raise error.ProgrammingError("skip character is only supported "
3182 "with a dict source")
3180 else:
3183 else:
3181 for f in map:
3184 for f in map:
3182 addpath(f)
3185 addpath(f)
General Comments 0
You need to be logged in to leave comments. Login now