fix(Backup): automatically rollback decryption when object is being deleted
This allows us to not have to call it everytime before returning Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
3b0f6de883
commit
cb7c0e653c
1 changed files with 3 additions and 0 deletions
|
|
@ -670,6 +670,9 @@ class Backup:
|
|||
os.remove(self.file_path.rstrip(".gz"))
|
||||
os.rename(self.file_path + ".gpg", self.file_path)
|
||||
|
||||
def __del__(self):
|
||||
self.decryption_rollback()
|
||||
|
||||
|
||||
def backup(
|
||||
with_files=False,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue