There was an error while loading. Please reload this page.
1 parent 214aa09 commit 7f7948cCopy full SHA for 7f7948c
1 file changed
scripts/cwa_db.py
@@ -79,8 +79,10 @@ def get_cwa_default_settings(self):
79
80
settings_lines = []
81
for line in settings_table.split('\n'):
82
- if line[:4] == " ":
83
- settings_lines.append(line.strip())
+ stripped = line.strip()
+ # Skip comment lines and empty lines
84
+ if line[:4] == " " and not stripped.startswith('--') and stripped:
85
+ settings_lines.append(stripped)
86
87
default_settings = {}
88
for line in settings_lines:
@@ -128,6 +130,9 @@ def add_missing_setting(self, setting) -> bool:
128
130
if match:
129
131
try:
132
command = line.replace('\n', '').strip()
133
+ # Skip SQL comments
134
+ if command.startswith('--') or not command:
135
+ continue
136
command = command.replace(',', ';')
137
with open('/config/.cwa_db_debug', 'a') as f:
138
f.write(command)
0 commit comments