From b863152f73441dbde2e52f5e842e2d28c44c1d9f Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Sun, 4 Sep 2016 21:53:43 +0200 Subject: [PATCH] Volume add size property wrapper --- qubes/storage/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index 4d04a818..e0257491 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -96,7 +96,7 @@ class Volume(object): self.revisions_to_keep = revisions_to_keep self.rw = rw self.save_on_stop = save_on_stop - self.size = int(size) + self._size = int(size) self.snap_on_start = snap_on_start self.source = source self.vid = vid @@ -133,6 +133,10 @@ class Volume(object): msg = "{!s} has revisions not implemented".format(self.__class__) raise NotImplementedError(msg) + @property + def size(self): + return self._size + @property def config(self): ''' return config data for serialization to qubes.xml '''