Fix ThinVolume _size access

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-09-02 19:45:31 +02:00
parent 1cf701ff60
commit 8974b2cbc0
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE

View File

@ -345,9 +345,9 @@ class ThinVolume(qubes.storage.Volume):
''' # pylint: disable=too-few-public-methods
def __init__(self, volume_group, **kwargs):
def __init__(self, volume_group, size=0, **kwargs):
self.volume_group = volume_group
super(ThinVolume, self).__init__(**kwargs)
super(ThinVolume, self).__init__(size=size, **kwargs)
if self.snap_on_start and self.source is None:
msg = "snap_on_start specified on {!r} but no volume source set"
@ -362,6 +362,8 @@ class ThinVolume(qubes.storage.Volume):
if not self._is_volatile:
self._vid_snap = self.vid + '-snap'
self._size = size
@property
def revisions(self):
path = self.path + '-back'