summary refs log tree commit diff
path: root/scripts/synapse_port_db
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-05-02 20:22:41 +0200
committerkaiyou <pierre@jaury.eu>2018-05-02 20:22:41 +0200
commit9a779c2ddb88f875d3ceec4ff02bdb922a0c57c6 (patch)
tree1034b986ea37a081707b489cb3ebe6e4d584defe /scripts/synapse_port_db
parentMake the logging level configurable (diff)
parentmissing word :| (diff)
downloadsynapse-9a779c2ddb88f875d3ceec4ff02bdb922a0c57c6.tar.xz
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
Diffstat (limited to 'scripts/synapse_port_db')
-rwxr-xr-xscripts/synapse_port_db4
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