diff options
author | rahulp13 | 2022-02-22 01:39:49 +0530 |
---|---|---|
committer | rahulp13 | 2022-02-22 01:39:49 +0530 |
commit | 2b0b878d72c74e3a335b346362eaa533c5459821 (patch) | |
tree | 29075732acd91939919dbb52be26f63af53fe4c6 | |
parent | b6dcef53727c4a216d7b80d3085c1c0e4651a95a (diff) | |
download | eSim-2b0b878d72c74e3a335b346362eaa533c5459821.tar.gz eSim-2b0b878d72c74e3a335b346362eaa533c5459821.tar.bz2 eSim-2b0b878d72c74e3a335b346362eaa533c5459821.zip |
Fix empty line lint_off crash issues
-rwxr-xr-x | src/maker/ModelGeneration.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/maker/ModelGeneration.py b/src/maker/ModelGeneration.py index 0a6df82c..cbb268af 100755 --- a/src/maker/ModelGeneration.py +++ b/src/maker/ModelGeneration.py @@ -806,10 +806,12 @@ and set the load for input ports */ init_path = '' self.cur_dir = os.getcwd() - file = open(init_path + "library/tlv/lint_off.txt").readlines() wno = " " - for item in file: - wno += " -Wno-" + item.strip("\n") + with open(init_path + "library/tlv/lint_off.txt") as file: + for item in file.readlines(): + if item and item.strip(): + wno += " -Wno-" + item.strip("\n") + print("Running Verilator.............") os.chdir(self.modelpath) self.release_home = self.parser.get('NGHDL', 'RELEASE') |