close version file after reading

This commit is contained in:
Maarten Boersma 2026-06-24 10:15:15 +02:00
parent d0fb2149d9
commit 448f0ce488
No known key found for this signature in database
GPG Key ID: 8C9CA0C6BE05CB08
1 changed files with 2 additions and 1 deletions

View File

@ -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"