Fix wrong usage of `isinstance` 63/7163/1
authorAnderson Bravalheri <a.bravalheri@bristol.ac.uk>
Fri, 1 Feb 2019 10:56:55 +0000 (10:56 +0000)
committerAnderson Bravalheri <a.bravalheri@bristol.ac.uk>
Fri, 1 Feb 2019 11:00:22 +0000 (11:00 +0000)
Second parameter should be a class, not string

Change-Id: I6401429d7cc314502a364b7fc81e73d30175b193
Signed-off-by: Anderson Bravalheri <a.bravalheri@bristol.ac.uk>
osm_ro/db_base.py

index e7a4fb3..a4cdef3 100644 (file)
@@ -170,7 +170,7 @@ class db_base():
         return self.con.escape(value)
 
     def escape_string(self, value):
-        if isinstance(value, "unicode"):
+        if isinstance(value, unicode):
             value = value.encode("utf8")
         return self.con.escape_string(value)