Log errors when fetching .xva images

This commit is contained in:
Jérémie Courrèges-Anglas 2014-11-20 15:48:56 +01:00
parent 3ede128155
commit bea13b4424

View File

@ -150,10 +150,11 @@ class backup_xva(backup_generic):
urllib.urlretrieve(url, filename_temp) urllib.urlretrieve(url, filename_temp)
urllib.urlcleanup() urllib.urlcleanup()
except: except Exception as e:
self.logger.error("[%s] error when fetching snap: %s", "tisbackup-%s"%(vdi_name), e)
if os.path.exists(filename_temp): if os.path.exists(filename_temp):
os.unlink(filename_temp) os.unlink(filename_temp)
raise raise
finally: finally:
if self.str2bool(halt_vm) == False: if self.str2bool(halt_vm) == False: