diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-04-09 23:40:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 23:40:44 +0100 |
commit | 8eaa141d8f1ffb4a437bc9e9220febde51e3497e (patch) | |
tree | 736679fd840ff67f9844dc99b9be7db0c6b71623 /scripts/synapse_port_db | |
parent | Merge pull request #3016 from silkeh/improve-service-lookups (diff) | |
parent | Replace some type checks with six type checks (diff) | |
download | synapse-8eaa141d8f1ffb4a437bc9e9220febde51e3497e.tar.xz |
Merge pull request #3075 from NotAFile/six-type-checks
Replace some type checks with six type checks
Diffstat (limited to 'scripts/synapse_port_db')
-rwxr-xr-x | scripts/synapse_port_db | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db index 7b23a44854..b9b828c154 100755 --- a/scripts/synapse_port_db +++ b/scripts/synapse_port_db @@ -30,6 +30,8 @@ import time import traceback import yaml +from six import string_types + logger = logging.getLogger("synapse_port_db") @@ -574,7 +576,7 @@ class Porter(object): def conv(j, col): if j in bool_cols: return bool(col) - elif isinstance(col, basestring) and "\0" in col: + elif isinstance(col, string_types) and "\0" in col: logger.warn("DROPPING ROW: NUL value in table %s col %s: %r", table, headers[j], col) raise BadValueException(); return col |