storage/reflink: trivial style tweaks
Avoid early return for short and not deeply nested functions.
This commit is contained in:
parent
21971d6d0a
commit
ada27ee431
@ -207,8 +207,7 @@ class ReflinkVolume(qubes.storage.Volume):
|
||||
@_locked
|
||||
def start(self):
|
||||
self._remove_incomplete_images()
|
||||
if self.is_dirty():
|
||||
return self
|
||||
if not self.is_dirty():
|
||||
if self.snap_on_start:
|
||||
# pylint: disable=protected-access
|
||||
_copy_file(self.source._path_clean, self._path_clean)
|
||||
@ -309,8 +308,7 @@ class ReflinkVolume(qubes.storage.Volume):
|
||||
@_coroutinized
|
||||
@_locked
|
||||
def import_volume(self, src_volume):
|
||||
if not self.save_on_stop:
|
||||
return self
|
||||
if self.save_on_stop:
|
||||
try:
|
||||
success = False
|
||||
_copy_file(src_volume.export(), self._path_import)
|
||||
|
Loading…
Reference in New Issue
Block a user