Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def compare_pragmas():
valid = True
for key, value in dc.DEFAULT_SETTINGS.items():
if not key.startswith('sqlite_'):
continue
pragma = key[7:]
result = cache._sql('PRAGMA %s' % pragma).fetchall()
if result == [(value,)]:
continue
args = pragma, result, [(value,)]
print('pragma %s mismatch: %r != %r' % args)
valid = False
results.append(valid)