Add --no-modify-db option for testing deployment and such.

master
Simon Quigley 5 years ago
parent 5c486a878a
commit c8f17940eb

@ -90,6 +90,7 @@ def main(module):
module = module()
# Stage the setup commands to be ran and run them
if not args.no_modify_db:
run = [module.sqlite_setup(), module.sqlite_add()]
log.debug(sqlite_run(run, db=args.db_location))
@ -120,6 +121,8 @@ if __name__ == "__main__":
help="Specify the location for the SQLite database")
parser.add_argument("--log", type=str, default="WARNING",
help="Default logging level")
parser.add_argument("--no-modify-db", action="store_true",
help="Don't insert any data into the DB, just read")
args = parser.parse_args()
# Ensure the logging level is set properly

Loading…
Cancel
Save