storage/reflink: make revisions() more readable, use iglob
This commit is contained in:
parent
18f9356c2c
commit
ef2698adb4
@ -297,10 +297,10 @@ class ReflinkVolume(qubes.storage.Volume):
|
|||||||
@property
|
@property
|
||||||
def revisions(self):
|
def revisions(self):
|
||||||
prefix = self._path_clean + '.'
|
prefix = self._path_clean + '.'
|
||||||
paths = glob.glob(glob.escape(prefix) + '*@*Z')
|
paths = glob.iglob(glob.escape(prefix) + '*@*Z')
|
||||||
items = sorted((path[len(prefix):-1].split('@') for path in paths),
|
items = (path[len(prefix):-1].split('@') for path in paths)
|
||||||
key=lambda item: int(item[0]))
|
return collections.OrderedDict(sorted(items,
|
||||||
return collections.OrderedDict(items)
|
key=lambda item: int(item[0])))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def usage(self):
|
def usage(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user