Skip to content

Commit

Permalink
nvtake: clean up old records from oldver file on saving
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg committed Dec 4, 2023
1 parent 4833135 commit eaac776
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nvchecker/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def take() -> None:
oldvers = core.read_verfile(oldverf)
newvers = core.read_verfile(newverf)

for removed in set(oldvers) - set(newvers):
del oldvers[removed]

if args.all:
oldvers.update(newvers)
else:
Expand Down

0 comments on commit eaac776

Please sign in to comment.