Break subprocess call into arg list.

This commit is contained in:
Matt Guthaus
2016-11-10 07:27:38 -08:00
parent da7ec0d00b
commit d7afb27322
2 changed files with 19 additions and 14 deletions
+5 -1
View File
@@ -27,7 +27,11 @@ def relative_compare(value1,value2):
def parse_output(filename, key):
"""Parses a hspice output.lis file for a key value"""
f = open("{0}/{1}.lis".format(OPTS.openram_temp, filename), "r")
full_filename="{0}{1}.lis".format(OPTS.openram_temp, filename)
try:
f = open(full_fliename, "r")
except:
debug.error("Unable to read spice output file: {0}".format(full_filename),1)
contents = f.read()
val = re.search(r"{0}\s*=\s*(-?\d+.?\d*\S*)\s+.*".format(key), contents)
if val != None: