summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-04 13:43:35 +0000
committerErik Johnston <erik@matrix.org>2015-03-04 13:43:35 +0000
commitb4c38738f438ee2b035a92d6e26b0f078956575f (patch)
treefc945634932ba474846f7315ceb5b62071d9191b
parentUse context manager with db conn to correctly commit and rollback (diff)
downloadsynapse-b4c38738f438ee2b035a92d6e26b0f078956575f.tar.xz
Change to use logger in db upgrade script
-rw-r--r--synapse/storage/schema/delta/14/upgrade_appservice_db.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/14/upgrade_appservice_db.py b/synapse/storage/schema/delta/14/upgrade_appservice_db.py
index 55e43c41ab..847b1c5b89 100644
--- a/synapse/storage/schema/delta/14/upgrade_appservice_db.py
+++ b/synapse/storage/schema/delta/14/upgrade_appservice_db.py
@@ -1,11 +1,14 @@
 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.