Use self.dest.storage.import* wrappers instead.
This commit is contained in:
parent
5c7b57e690
commit
56fbf108f8
@ -499,12 +499,12 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI):
|
|||||||
size = volume.size
|
size = volume.size
|
||||||
|
|
||||||
# Clear the volume by importing empty data into it
|
# Clear the volume by importing empty data into it
|
||||||
path = yield from volume.import_data(size)
|
path = yield from self.dest.storage.import_data(self.arg, size)
|
||||||
self.dest.fire_event('domain-volume-import-begin',
|
self.dest.fire_event('domain-volume-import-begin',
|
||||||
volume=self.arg, size=size)
|
volume=self.arg, size=size)
|
||||||
pathlib.Path(path).touch()
|
pathlib.Path(path).touch()
|
||||||
try:
|
try:
|
||||||
yield from volume.import_data_end(True)
|
yield from self.dest.storage.import_data_end(self.arg, True)
|
||||||
except:
|
except:
|
||||||
self.dest.fire_event('domain-volume-import-end',
|
self.dest.fire_event('domain-volume-import-end',
|
||||||
volume=self.arg, success=False)
|
volume=self.arg, success=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user