From 3d40abfd5c1c2dc7545376dba5b8661b2d7b2a88 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Tue, 19 Oct 2021 18:20:44 +0200 Subject: [PATCH] fix: [import] don't exit on update process --- bin/import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/import.py b/bin/import.py index a71fd49..9fc3e1d 100644 --- a/bin/import.py +++ b/bin/import.py @@ -97,7 +97,7 @@ if __name__ == '__main__': argparser.add_argument('--update', '-u', action='store_true', default=False, help='Update the CPE database without flushing') args = argparser.parse_args() - if args.replace == 0 and rdb.dbsize() > 0: + if args.replace == 0 and rdb.dbsize() > 0 and not args.update: print(f"Warning! The Redis database already has {rdb.dbsize()} keys.") print("Use --replace if you want to flush the database and repopulate it.") sys.exit(1)