Tests: cli: Detect and handle the -d '' case

This commit is contained in:
Adrien Vergé
2016-03-25 13:25:28 +01:00
parent 53da21934d
commit 59d5bffbec
3 changed files with 17 additions and 2 deletions

View File

@@ -59,6 +59,9 @@ class YamlLintConfig(object):
except Exception as e:
raise YamlLintConfigError('invalid config: %s' % e)
if type(conf) != dict:
raise YamlLintConfigError('invalid config: not a dict')
self.rules = conf.get('rules', {})
# Does this conf override another conf that we need to load?