summary refs log tree commit diff
path: root/synapse/storage/prepare_database.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-11-20 22:46:51 +0000
committerRichard van der Hoff <richard@matrix.org>2018-11-20 22:52:34 +0000
commit6c18cc4b506a81c2a92665a15c55a0313ca47db3 (patch)
tree3547ba46cd82bac16d2514ebd36c3a5599b63726 /synapse/storage/prepare_database.py
parentRemove riot.im from the list of trusted Identity Servers in the default confi... (diff)
downloadsynapse-6c18cc4b506a81c2a92665a15c55a0313ca47db3.tar.xz
Ignore __pycache__ directories in schema delta dir
Now that we use py3, compiled python ends up in __pycache__ rather than *.pyc.
Diffstat (limited to 'synapse/storage/prepare_database.py')
-rw-r--r--synapse/storage/prepare_database.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/prepare_database.py b/synapse/storage/prepare_database.py
index bd740e1e45..d5d2f89a77 100644
--- a/synapse/storage/prepare_database.py
+++ b/synapse/storage/prepare_database.py
@@ -257,7 +257,7 @@ def _upgrade_existing_database(cur, current_version, applied_delta_files,
                 module.run_create(cur, database_engine)
                 if not is_empty:
                     module.run_upgrade(cur, database_engine, config=config)
-            elif ext == ".pyc":
+            elif ext == ".pyc" or file_name == "__pycache__":
                 # Sometimes .pyc files turn up anyway even though we've
                 # disabled their generation; e.g. from distribution package
                 # installers. Silently skip it