summary refs log tree commit diff
path: root/synapse/storage/directory.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-08 16:53:48 +0100
committerErik Johnston <erik@matrix.org>2015-04-08 16:53:48 +0100
commit279a547a8b7f7e9b9e8f4ed1ae25686824198107 (patch)
tree7029d05b614039823b5251863c0d132923b86cd5 /synapse/storage/directory.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into mysql (diff)
downloadsynapse-279a547a8b7f7e9b9e8f4ed1ae25686824198107.tar.xz
Use generic db exceptions rather than sqlite3 specific ones
Diffstat (limited to 'synapse/storage/directory.py')
-rw-r--r--synapse/storage/directory.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/storage/directory.py b/synapse/storage/directory.py
index cfb2005706..2b2bdf8615 100644
--- a/synapse/storage/directory.py
+++ b/synapse/storage/directory.py
@@ -21,8 +21,6 @@ from twisted.internet import defer
 
 from collections import namedtuple
 
-import sqlite3
-
 
 RoomAliasMapping = namedtuple(
     "RoomAliasMapping",
@@ -91,7 +89,7 @@ class DirectoryStore(SQLBaseStore):
                 },
                 desc="create_room_alias_association",
             )
-        except sqlite3.IntegrityError:
+        except self.database_engine.module.IntegrityError:
             raise SynapseError(
                 409, "Room alias %s already exists" % room_alias.to_string()
             )