improved logging

This commit is contained in:
2021-05-31 20:29:12 +02:00
parent b772c5d320
commit 2e7129a776

View File

@@ -32,13 +32,13 @@ def parse_pkgbuild(pkgbuild_file: str) -> dict:
os.chdir(sys.path[0])
if res.returncode:
logging.warning("[PKGBUILD] makekg failed: %s", res.stdout.decode(errors="ignore"))
logging.warning("[PKGBUILD/%s] makepkg failed: %s", pkgbuild_path.name, res.stdout.decode(errors="ignore"))
return {}
(parsed, errors) = parse_srcinfo(res.stdout.decode(errors="ignore"))
if errors:
logging.warning("[PKGBUILD] Failed to parse %s: %s", pkgbuild_path.name, errors)
logging.warning("[PKGBUILD/%s] Failed to parse: %s", pkgbuild_path.name, errors)
return {}
return parsed