lib.FileContext.file_exists(): Fix missing await

file_exists and _stat() in file_exists() are async, need to be awaited, but aren't. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-21 10:21:22 +02:00
commit b44879c517
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
2 changed files with 4 additions and 4 deletions

View file

@ -40,7 +40,7 @@ class DistroContext(FilesContext):
ret = []
for tmpl in await self.list_template_files(packages):
path = str(Path(tmpl).with_suffix(".jw-secret"))
if ignore_missing and not self.ctx.file_exists(path):
if ignore_missing and not await self.ctx.file_exists(path):
continue
ret.append(path)
return ret
@ -49,7 +49,7 @@ class DistroContext(FilesContext):
ret = []
for tmpl in await self.list_template_files(packages):
path = tmpl.removesuffix('.jw-tmpl')
if ignore_missing and not self.ctx.file_exists(path):
if ignore_missing and not await self.ctx.file_exists(path):
continue
ret.append(path)
return ret