Skip to content

Commit

Permalink
allow overwrite if --merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Apr 10, 2022
1 parent 9200f3d commit 2fd993d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sigs-to-manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ def main():
return 0

if args.merge_previous:
notify(f"merging {len(previous.rows)} previous rows into current.")
# note, this is important for CSV manifests, but not for SQL manifests.
notify(f"merging previous rows into current.")
rows.extend(previous.rows)

m = CollectionManifest(rows)
m.write_to_filename(args.output, database_format=args.database_format)
m.write_to_filename(args.output, database_format=args.database_format,
ok_if_exists=args.merge_previous)

notify(f"saved {len(m)} manifest rows to '{args.output}'")

Expand Down

0 comments on commit 2fd993d

Please sign in to comment.