Browse Source

pg8000.core.text_out(): ensure we're dealing with a string object

William Pitcock 4 years ago
parent
commit
e59356b700
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      pg8000/core.py

+ 1
- 1
pg8000/core.py View File

@@ -1350,7 +1350,7 @@ class Connection(object):
1350 1350
         self.ParameterStatusReceived += self.handle_PARAMETER_STATUS
1351 1351
 
1352 1352
         def text_out(v):
1353
-            return v.encode(self._client_encoding)
1353
+            return str(v).encode(self._client_encoding)
1354 1354
 
1355 1355
         def time_out(v):
1356 1356
             return v.isoformat().encode(self._client_encoding)