mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 11:58:55 +00:00
fw/execution: fix get_resource with strict=False
If strict=False, resolver.get_resource will return None, rather than raising NotFoundError. Do not attempt to record the md5 hash in that case.
This commit is contained in:
parent
ba717bbcd1
commit
ee3c01418f
@ -184,6 +184,8 @@ class ExecutionContext(object):
|
||||
|
||||
def get_resource(self, resource, strict=True):
|
||||
result = self.resolver.get(resource, strict)
|
||||
if result is None:
|
||||
return result
|
||||
if os.path.isfile(result):
|
||||
with open(result, 'rb') as fh:
|
||||
md5hash = hashlib.md5(fh.read())
|
||||
|
Loading…
x
Reference in New Issue
Block a user