mirror of https://github.com/VLSIDA/OpenRAM.git
Merge pull request #297 from Aurora7913/close-filehandles
Fix python warnings about filehandles left open
This commit is contained in:
commit
c4e94f25d3
|
|
@ -90,6 +90,7 @@ def log(str):
|
|||
compile_log.write(line)
|
||||
log.setup_output = []
|
||||
compile_log.write(str + '\n')
|
||||
compile_log.close()
|
||||
else:
|
||||
log.setup_output.append(str + "\n")
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ from openram import options
|
|||
|
||||
|
||||
from openram import OPENRAM_HOME
|
||||
VERSION = open(OPENRAM_HOME + "/../VERSION").read().rstrip()
|
||||
with open(OPENRAM_HOME + "/../VERSION", "r", encoding="utf-8") as version_file:
|
||||
VERSION = version_file.read().rstrip()
|
||||
NAME = "OpenRAM v{}".format(VERSION)
|
||||
USAGE = "sram_compiler.py [options] <config file>\nUse -h for help.\n"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue