Ignore __pycache__ directories in schema delta dir

Now that we use py3, compiled python ends up in __pycache__ rather than *.pyc.
This commit is contained in:
Richard van der Hoff 2018-11-20 22:46:51 +00:00
parent 78ba0e7ab8
commit 6c18cc4b50
2 changed files with 2 additions and 1 deletions

1
changelog.d/4214.misc Normal file
View file

@ -0,0 +1 @@
Ignore __pycache__ directories in the database schema folder

View file

@ -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