From 8e46c4e1a041b1b8c7e01185123a7d8357fc94f3 Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Wed, 20 Nov 2019 17:00:51 +0100
Subject: [PATCH] set universal_newlines flag in Popen

This enables string encoding in passed streams => stdout and stderr
---
 modules/bindings/pymod/hbplus.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/bindings/pymod/hbplus.py b/modules/bindings/pymod/hbplus.py
index 39b903359..3ca6361a4 100644
--- a/modules/bindings/pymod/hbplus.py
+++ b/modules/bindings/pymod/hbplus.py
@@ -63,7 +63,7 @@ def HBondList(ent, hbplus_bin=None):
   full_bin=_LocateHBPlus(hbplus_bin)
   temp_d=tempfile.mkdtemp(prefix='hbplus_')
   hb_proc=subprocess.Popen(full_bin, shell=True, stdout=subprocess.PIPE,
-                           stdin=subprocess.PIPE)
+                           stdin=subprocess.PIPE, universal_newlines=True)
   file_name=os.path.join(temp_d, 'ent.pdb')
   io.SaveEntity(ent, file_name)
   hb_proc.stdin.write('%s\n' % temp_d)
-- 
GitLab