Skip to content

Commit

Permalink
reset chksum before closing
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Sep 5, 2023
1 parent 964a597 commit d074261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions libvirtnbdbackup/output/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def truncate(self, size: int) -> None:

def close(self):
"""Close wrapper"""
self.chksum = 1
return self.fileHandle.close()

def seek(self, tgt: int, whence: int = 0):
Expand Down
2 changes: 1 addition & 1 deletion virtnbdbackup
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,8 @@ def backupDisk(

progressBar.close()
logging.debug("Closing write handle.")
fileStream.close()
fileStream.checksum()
fileStream.close()
connection.disconnect()
if args.offline is True and virtClient.remoteHost == "":
logging.info("Stopping NBD Service.")
Expand Down

0 comments on commit d074261

Please sign in to comment.