Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed encoding in subprocess communication in Python 3

  • Loading branch information...
commit 3f93369a70715edc863a7775e9b60238a6f66753 1 parent e49a2f4
@dvarrazzo authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  pgxnclient/commands/install.py
View
3  pgxnclient/commands/install.py
@@ -291,6 +291,9 @@ def load_sql(self, filename=None, data=None):
tdata = data
logger.debug('running sql command: "%s"', tdata)
p = self.popen(cmdline, stdin=PIPE)
+ # for Python 3: just assume default encoding will do
+ if isinstance(data, unicode):
+ data = data.encode()
p.communicate(data)
if p.returncode:
Please sign in to comment.
Something went wrong with that request. Please try again.