Skip to content
Snippets Groups Projects
Commit b4c38738 authored by Erik Johnston's avatar Erik Johnston
Browse files

Change to use logger in db upgrade script

parent 640e5393
No related branches found
No related tags found
No related merge requests found
import json
import logging
logger = logging.getLogger(__name__)
def run_upgrade(cur):
cur.execute("SELECT id, regex FROM application_services_regex")
for row in cur.fetchall():
try:
print "checking %s..." % row[0]
logger.debug("Checking %s..." % row[0])
json.loads(row[1])
except ValueError:
# row isn't in json, make it so.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment