Fix export xva with Xenserver > 7.1
This commit is contained in:
parent
b8c343bdf7
commit
2853903232
@ -184,11 +184,10 @@ class backup_xva(backup_generic):
|
|||||||
session.logout()
|
session.logout()
|
||||||
|
|
||||||
if os.path.exists(filename_temp):
|
if os.path.exists(filename_temp):
|
||||||
tar = tarfile.open(filename_temp)
|
tar = os.system('tar tf "%s" > /dev/null' % filename_temp)
|
||||||
if not tar.getnames():
|
if not tar == 0:
|
||||||
os.unlink(filename_temp)
|
os.unlink(filename_temp)
|
||||||
return("Tar error")
|
return("Tar error")
|
||||||
tar.close()
|
|
||||||
if str2bool(self.verify_export):
|
if str2bool(self.verify_export):
|
||||||
self.verify_export_xva(filename_temp)
|
self.verify_export_xva(filename_temp)
|
||||||
os.rename(filename_temp,filename)
|
os.rename(filename_temp,filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user