btrfs only commit when job succeeded

This commit is contained in:
bigeagle 2014-10-24 00:51:30 +08:00
parent f88b89e873
commit 2a609f6eb7

View File

@ -20,7 +20,8 @@ class BtrfsHook(JobHook):
def before_job(self, *args, **kwargs):
self._create_working_snapshot()
def after_job(self, *args, **kwargs):
def after_job(self, status=None, *args, **kwargs):
if status == "success":
self._commit_changes()
def _ensure_subvolume(self):