Skip to content

Commit

Permalink
Support lists in file_input_parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Nov 7, 2024
1 parent 8d3d6bc commit 6360b4a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions fusesoc/edalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,16 @@ def _sha256_file_input_hexdigest(self):
hash = hashlib.sha256()

for f in input_files:
abs_f = os.path.join(self.generator_input["files_root"], f)
try:
hash.update(pathlib.Path(abs_f).read_bytes())
except Exception as e:
raise RuntimeError("Unable to hash file: " + str(e))
if type(f) == list:
files = f
else:
files = [f]
for ff in files:
abs_f = os.path.join(self.generator_input["files_root"], ff)
try:
hash.update(pathlib.Path(abs_f).read_bytes())
except Exception as e:
raise RuntimeError("Unable to hash file: " + str(e))

return hash.hexdigest()

Expand Down

0 comments on commit 6360b4a

Please sign in to comment.