urlfetcher: Throw error if iso _grabber file doesn't exist

isoinfo won't error here at least for me on Fedora 28, so
use hasFile to confirm
This commit is contained in:
Cole Robinson 2018-03-28 14:02:23 -04:00
parent 46ec093a28
commit 01b665a6c3

View File

@ -328,6 +328,9 @@ class _ISOURLFetcher(_URLFetcher):
"""
Use isoinfo to grab the file
"""
if not self._hasFile(url):
raise RuntimeError("isoinfo didn't find file=%s" % url)
cmd = ["isoinfo", "-J", "-i", self.location, "-x", url]
logging.debug("Running isoinfo: %s", cmd)