From 0695cc1829e021245aa324c6a00b7dabb689ae83 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 16 Mar 2020 22:48:49 +0100 Subject: [PATCH] simplified --- processing/post/reLabel.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/processing/post/reLabel.py b/processing/post/reLabel.py index 85d16acea..b08659dfb 100755 --- a/processing/post/reLabel.py +++ b/processing/post/reLabel.py @@ -44,9 +44,7 @@ for name in filenames: damask.util.report(scriptName,name) table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) - for i,label in enumerate(options.label): - table.rename(label, - options.substitute[i], - scriptID+' '+' '.join(sys.argv[1:])) + for label,substitue in enumerate(options.label,options.substitute): + table.rename(label,substitute,scriptID+' '+' '.join(sys.argv[1:])) table.to_ASCII(sys.stdout if name is None else name)