Default database table to TempHumid when missing from config.
Preserves compatibility with existing /etc/thMonitor.conf files created before the table option was added. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -51,7 +51,9 @@ def load_config(path=DEFAULT_CONFIG):
|
||||
'loglevel': config.get('software', 'loglevel'),
|
||||
'host': config.get('database', 'host'),
|
||||
'db': config.get('database', 'db'),
|
||||
'table': validate_table_name(config.get('database', 'table')),
|
||||
'table': validate_table_name(
|
||||
config.get('database', 'table', fallback='TempHumid'),
|
||||
),
|
||||
'username': config.get('database', 'username'),
|
||||
'password': config.get('database', 'password'),
|
||||
'sql_retries': config.getint('database', 'sql_retries'),
|
||||
|
||||
Reference in New Issue
Block a user