Add better info messages. Convert subprocess to a shell command.

This commit is contained in:
Matt Guthaus
2016-11-10 08:36:28 -08:00
parent 7b90b9a0e6
commit e017f3f4ca
3 changed files with 23 additions and 9 deletions
+3 -3
View File
@@ -29,9 +29,9 @@ def parse_output(filename, key):
"""Parses a hspice output.lis file for a key value"""
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)
f = open(full_filename, "r")
except IOError:
debug.error("Unable to open 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: