summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrej Shadura <andrewsh@debian.org>2020-10-31 10:03:23 +0100
committerAndrej Shadura <andrewsh@debian.org>2020-10-31 10:03:23 +0100
commitbb2febeb6aaa2b7a4150c47b2dc2b318435ccaff (patch)
tree8ca8b739f50cdb9a0ded12d92aa0a41449e65ab5 /scripts
parent547115d704df226061a23b0d97154d484f707e5c (diff)
New upstream version 1.22.1
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/synapse_port_db8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db
index ae2887b7..6c7664ad 100755
--- a/scripts/synapse_port_db
+++ b/scripts/synapse_port_db
@@ -22,6 +22,7 @@ import logging
import sys
import time
import traceback
+from typing import Optional
import yaml
@@ -90,6 +91,7 @@ BOOLEAN_COLUMNS = {
"room_stats_state": ["is_federatable"],
"local_media_repository": ["safe_from_quarantine"],
"users": ["shadow_banned"],
+ "e2e_fallback_keys_json": ["used"],
}
@@ -151,7 +153,7 @@ IGNORED_TABLES = {
# Error returned by the run function. Used at the top-level part of the script to
# handle errors and return codes.
-end_error = None
+end_error = None # type: Optional[str]
# The exec_info for the error, if any. If error is defined but not exec_info the script
# will show only the error message without the stacktrace, if exec_info is defined but
# not the error then the script will show nothing outside of what's printed in the run
@@ -489,7 +491,7 @@ class Porter(object):
hs = MockHomeserver(self.hs_config)
- with make_conn(db_config, engine) as db_conn:
+ with make_conn(db_config, engine, "portdb") as db_conn:
engine.check_database(
db_conn, allow_outdated_version=allow_outdated_version
)
@@ -634,7 +636,7 @@ class Porter(object):
self.progress.done()
except Exception as e:
global end_error_exec_info
- end_error = e
+ end_error = str(e)
end_error_exec_info = sys.exc_info()
logger.exception("")
finally: