Raise exception upon missing value

This commit is contained in:
Schimon Jehudah 2024-03-13 07:59:15 +00:00
parent 9692d92e21
commit 077042dd43

View file

@ -2504,8 +2504,9 @@ async def set_setting_value(db_file, key_value):
.format(function_name, db_file, key, val))
if not val:
logger.error('Missing value for key "{}" ({}).'.format(key, db_file))
return
raise Exception('Missing value for key "{}" ({}).'.format(key, db_file))
# logger.error('Missing value for key "{}" ({}).'.format(key, db_file))
# return
async with DBLOCK:
with create_connection(db_file) as conn: