Raise KeyError for None key in lazy loader

This commit is contained in:
Dmitry Kuzmenko 2015-02-12 13:41:33 +03:00
parent dc07c023cf
commit 787f43e394

View File

@ -1030,7 +1030,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
Load a single item if you have it
'''
# if the key doesn't have a '.' then it isn't valid for this mod dict
if '.' not in key:
if key is None or '.' not in key:
raise KeyError
mod_name, _ = key.split('.', 1)
if mod_name in self.missing_modules: