From 2632be2a7634b87ddecd29a1eb4ddaa6588ce812 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 20 Jul 2018 03:09:53 +0200 Subject: [PATCH] polishing --- lib/damask/util.py | 6 ++++-- processing/post/addCurl.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/damask/util.py b/lib/damask/util.py index 93387205e..8727a1473 100644 --- a/lib/damask/util.py +++ b/lib/damask/util.py @@ -93,8 +93,10 @@ def execute(cmd, stdout = subprocess.PIPE, stderr = subprocess.PIPE, stdin = subprocess.PIPE) - out,error = [i.replace(b"\x08",b"") for i in (process.communicate() if streamIn is None - else process.communicate(streamIn.read()))] + out,error = [i for i in (process.communicate() if streamIn is None + else process.communicate(streamIn.read().encode('utf-8')))] + out = out.decode('utf-8').replace('\x08','') + error = error.decode('utf-8').replace('\x08','') os.chdir(initialPath) if process.returncode != 0: raise RuntimeError('{} failed with returncode {}'.format(cmd,process.returncode)) return out,error diff --git a/processing/post/addCurl.py b/processing/post/addCurl.py index 5ca851b22..52a4ae438 100755 --- a/processing/post/addCurl.py +++ b/processing/post/addCurl.py @@ -138,7 +138,6 @@ for name in filenames: # --------------- figure out size and grid --------------------------------------------------------- table.data_readArray() - grid,size = damask.util.coordGridAndSize(table.data[:,table.label_indexrange(options.pos)]) # ------------------------------------------ process value field -----------------------------------