Fixes configplugin execution bug

If we get an AttributeError, when executing yaml.load(), the execution of the
plugin fails. This patch fixes this issue.

Change-Id: Icc5d46adaf4e63e00e6e346161b7cccf93d2e4dd
This commit is contained in:
Robert Tingirica 2014-12-08 18:45:07 +02:00
parent 3f91aabce2
commit 98be94fd27

View File

@ -153,7 +153,7 @@ class CloudConfigPlugin(base.BaseUserDataPlugin):
try:
content = yaml.load(part, Loader=loader)
except ValueError:
except (ValueError, AttributeError):
LOG.error("Invalid yaml stream provided.")
return False