Some exception handling cleanups and making sure url has a len before we install it.
This commit is contained in:
@@ -155,9 +155,13 @@ class ImageCreationService:
|
||||
def install(self):
|
||||
for url in self.urls:
|
||||
try:
|
||||
Image(url, self.token).install()
|
||||
except Exception, e:
|
||||
LOG.exception('Installing "%s" failed due to "%s"', url, e.message)
|
||||
if(len(url)):
|
||||
Image(url, self.token).install()
|
||||
except IOError, e:
|
||||
LOG.exception('Installing "%s" failed', url)
|
||||
except tarfile.TarError, e:
|
||||
LOG.exception('Extracting "%s" failed', url)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import logging
|
||||
|
||||
Reference in New Issue
Block a user