Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #15 from Oslandia/fix_infinite_loop_with_python3
Browse files Browse the repository at this point in the history
fix infinite loop with python3
  • Loading branch information
Hugo Mercier committed Jul 2, 2019
2 parents 97674f9 + 4a41cdb commit a9e3acd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pglite/pglite.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def import_db(dump_file, db_name):
c = read_config()
p = subprocess.Popen([os.path.join(os.path.dirname(c['pg_ctl_path']), "psql"), "-h", "localhost", "-p", c['port'], "-d", db_name], stdin = subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
with open(dump_file, "rb") as fi:
for chunk in iter(lambda: fi.read(2048), ''):
for chunk in iter(lambda: fi.read(2048), b''):
p.stdin.write(zd.decompress(chunk))
p.stdin.write(zd.flush())
p.stdin.close()
Expand Down

0 comments on commit a9e3acd

Please sign in to comment.