Changeset 785 for trunk/pg.py


Ignore:
Timestamp:
Jan 26, 2016, 12:50:41 PM (3 years ago)
Author:
cito
Message:

Make all tests run again with Python 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pg.py

    r781 r785  
    539539        """Prepare a bytea array parameter."""
    540540        if isinstance(d, list):
    541             return '{%s}' % ','.join(self._prepare_bytea_array(v) for v in d)
     541            return b'{' + b','.join(
     542                self._prepare_bytea_array(v) for v in d) + b'}'
    542543        if d is None:
    543             return 'null'
    544         return self.escape_bytea(d).replace('\\', '\\\\')
     544            return b'null'
     545        return self.escape_bytea(d).replace(b'\\', b'\\\\')
    545546
    546547    def _prepare_json_array(self, d):
Note: See TracChangeset for help on using the changeset viewer.