From c663c88093e00cd91fe7327f4dccad10f51058ce Mon Sep 17 00:00:00 2001 From: Stefan Bienert <stefan.bienert@unibas.ch> Date: Mon, 10 Feb 2020 11:12:30 +0100 Subject: [PATCH] SCHWED-4382: Better logging for HHblits --- modules/bindings/pymod/hhblits.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/bindings/pymod/hhblits.py b/modules/bindings/pymod/hhblits.py index 5567dd229..ff08319a4 100644 --- a/modules/bindings/pymod/hhblits.py +++ b/modules/bindings/pymod/hhblits.py @@ -624,8 +624,17 @@ class HHblits: return hhm_file ost.LogVerbose('converting %s to %s' % (a3m_file, hhm_file)) os.putenv('HHLIB', self.hhlib_dir) - if subprocess.call('%s -i %s -o %s' % (hhmake, a3m_file, hhm_file), - shell=True): + job = subprocess.Popen('%s -i %s -o %s' % (hhmake, a3m_file, hhm_file), + shell=True, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + sout, serr = job.communicate() + lines = serr.decode().splitlines() + for line in lines: + ost.LogWarning(line) + lines = sout.decode().splitlines() + for line in lines: + ost.LogVerbose(line) + if job.returncode !=0: raise IOError('could not convert a3m to hhm file') return hhm_file -- GitLab