storage: fix storage.import_data_end when given Volume instance

Leftover from '0f12870 storage: use direct object references, not only
identifiers'
This commit is contained in:
Marek Marczykowski-Górecki 2017-08-12 22:39:41 +02:00
parent 8d8bbb99e9
commit 3338854b1c
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -660,8 +660,7 @@ class Storage(object):
assert isinstance(volume, (Volume, str)), \
"You need to pass a Volume or pool name as str"
if isinstance(volume, Volume):
return volume.import_data_end(volume,
success=success)
return volume.import_data_end(success=success)
return self.vm.volumes[volume].import_data_end(success=success)