Fix export xva with Xenserver > 7.1

This commit is contained in:
ssamson-tis 2017-07-24 18:23:15 +02:00
parent b8c343bdf7
commit 2853903232

View File

@ -184,11 +184,10 @@ class backup_xva(backup_generic):
session.logout()
if os.path.exists(filename_temp):
tar = tarfile.open(filename_temp)
if not tar.getnames():
tar = os.system('tar tf "%s" > /dev/null' % filename_temp)
if not tar == 0:
os.unlink(filename_temp)
return("Tar error")
tar.close()
if str2bool(self.verify_export):
self.verify_export_xva(filename_temp)
os.rename(filename_temp,filename)