Log the exception when an invalid modulemd is encountered

This will help us determine why a modulemd couldn't be parsed
other than formatting issues. An example of this is if the database
session becomes stale, the exception is not due to the modulemd being
invalid.
This commit is contained in:
mprahl
2019-03-20 13:43:22 -04:00
parent 40ce635164
commit c65e1b0a53

View File

@@ -384,6 +384,7 @@ class ModuleBuild(MBSBase):
mmd = Modulemd.Module().new_from_string(self.modulemd)
mmd.upgrade()
except Exception:
log.exception('An error occurred while trying to parse the modulemd')
raise ValueError("Invalid modulemd")
return mmd