mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
tests/functional: resolve str(Asset) to cache file path
Allow an Asset object to be used in place of a filename but making its string representation resolve to the cache file path. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20241217155953.3950506-4-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
8a6253a43a
commit
c27f452d61
1 changed files with 3 additions and 0 deletions
|
@ -39,6 +39,9 @@ class Asset:
|
|||
return "Asset: url=%s hash=%s cache=%s" % (
|
||||
self.url, self.hash, self.cache_file)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.cache_file)
|
||||
|
||||
def _check(self, cache_file):
|
||||
if self.hash is None:
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue