summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-25 17:15:20 +0000
committerErik Johnston <erik@matrix.org>2015-03-25 17:15:20 +0000
commit0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed (patch)
tree39bdcca49ae0eabf09b3a98e2c4b810e0c68692f /synapse/storage/__init__.py
parentEscape non printing ascii character (diff)
downloadsynapse-0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed.tar.xz
Fix unicode database support
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index e03d55b00d..abde7d0df5 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -410,10 +410,14 @@ def executescript(txn, schema_path):
 
 
 def _get_or_create_schema_state(txn):
-    schema_path = os.path.join(
-        dir_path, "schema", "schema_version.sql",
-    )
-    executescript(txn, schema_path)
+    try:
+        # Bluntly try creating the schema_version tables.
+        schema_path = os.path.join(
+            dir_path, "schema", "schema_version.sql",
+        )
+        executescript(txn, schema_path)
+    except:
+        pass
 
     txn.execute("SELECT version, upgraded FROM schema_version")
     row = txn.fetchone()