diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-25 17:15:20 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-25 17:15:20 +0000 |
commit | 0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed (patch) | |
tree | 39bdcca49ae0eabf09b3a98e2c4b810e0c68692f /synapse/storage/__init__.py | |
parent | Escape non printing ascii character (diff) | |
download | synapse-0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed.tar.xz |
Fix unicode database support
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r-- | synapse/storage/__init__.py | 12 |
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() |