summary refs log tree commit diff
path: root/synapse/config/database.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-01-19 15:26:19 +0000
committerMark Haines <mark.haines@matrix.org>2015-01-19 15:26:19 +0000
commit3e85e52b3f0e9330f29ec3d0f572db7b122c88b0 (patch)
treec76b1a2c0ba99637188186f92972e7e4dbcd013d /synapse/config/database.py
parentFinish renaming "context" to "room_id" in federation codebase (diff)
downloadsynapse-3e85e52b3f0e9330f29ec3d0f572db7b122c88b0.tar.xz
Allow ':memory:' as the database path for sqlite3
Diffstat (limited to 'synapse/config/database.py')
-rw-r--r--synapse/config/database.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/config/database.py b/synapse/config/database.py
index 0d33583a7d..daa161c952 100644
--- a/synapse/config/database.py
+++ b/synapse/config/database.py
@@ -20,7 +20,10 @@ import os
 class DatabaseConfig(Config):
     def __init__(self, args):
         super(DatabaseConfig, self).__init__(args)
-        self.database_path = self.abspath(args.database_path)
+        if args.database_path == ":memory:":
+            self.database_path = ":memory:"
+        else:
+            self.database_path = self.abspath(args.database_path)
 
     @classmethod
     def add_arguments(cls, parser):