Salvatore Bonaccorso pushed to branch master at Debian Security Tracker / security-tracker
Commits: ca6a9f7c by Salvatore Bonaccorso at 2023-05-27T20:54:08+02:00 update-db: Allow to enable verbose logging of DB update operations Signed-off-by: Salvatore Bonaccorso <[email protected]> - - - - - ab87a67f by Salvatore Bonaccorso at 2023-05-29T14:48:32+00:00 Merge branch 'verbose-update-db' into 'master' update-db: Allow to enable verbose logging of DB update operations See merge request security-tracker-team/security-tracker!135 - - - - - 1 changed file: - bin/update-db Changes: ===================================== bin/update-db ===================================== @@ -3,15 +3,23 @@ from __future__ import print_function import os import sys +import argparse import setup_paths import bugs import debian_support import security_db -db_file = sys.argv[1] +parser = argparse.ArgumentParser(description="Update Security Tracker Sqlite database") +parser.add_argument('--verbose', '-v', action='store_true', + help="Enable verbose messages for DB update operations") +parser.add_argument('file', nargs='?', help='Database file to process') +args = parser.parse_args() + +db_file = args.file + try: - db = security_db.DB(db_file) + db = security_db.DB(db_file, verbose=args.verbose) new_file = False except security_db.SchemaMismatch: os.unlink(db_file) View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/compare/7fda9d6a2be2bd3ad410808f339e44837d149823...ab87a67fda65dc8dac3a6a4a4cb1fe7244fde733 -- View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/compare/7fda9d6a2be2bd3ad410808f339e44837d149823...ab87a67fda65dc8dac3a6a4a4cb1fe7244fde733 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-security-tracker-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-security-tracker-commits
