tuned: fixed exception if there is an option without section in profile
e.g. the following caused an exception: include=profile Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
1ba523b1f3
commit
a77119aff0
1 changed files with 5 additions and 1 deletions
|
|
@ -86,7 +86,11 @@ class Loader(object):
|
|||
self._variables.add_from_cfg(config_obj[section], os.path.dirname(file_name))
|
||||
else:
|
||||
config[section] = collections.OrderedDict()
|
||||
for option in config_obj[section].keys():
|
||||
try:
|
||||
keys = config_obj[section].keys()
|
||||
except AttributeError:
|
||||
raise InvalidProfileException("Error parsing section '%s' in file '%s'." % (section, file_name))
|
||||
for option in keys:
|
||||
config[section][option] = config_obj[section][option]
|
||||
|
||||
# hack to notify plugins about profile location
|
||||
|
|
|
|||
Loading…
Reference in a new issue