From 3b0d45dfb1c242b70a0400e9584cce16a88f7057 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 8 Sep 2019 19:05:09 +0800 Subject: [PATCH] fix a bug while reading log --- extra.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra.py b/extra.py index 7456809..4d3a4c2 100644 --- a/extra.py +++ b/extra.py @@ -54,9 +54,9 @@ def readpkglog(pkgdirname, update=False): return f"{cwd / logfile} cannot be found" def readmainlog(debug=False): logfile = MAIN_LOGFILE if debug else CONSOLE_LOGFILE - if (PKGBUILD_DIR / logfile).exists(): + if (Path('.') / logfile).exists(): logger.debug(f'formatting buildbot{" debug" if debug else ""} logs') - return __simpleread(PKGBUILD_DIR / logfile) + return __simpleread(Path('.') / logfile) else: logger.debug(f'not found: buildbot{" debug" if debug else ""} log') - return f"{PKGBUILD_DIR / logfile} cannot be found" + return f"{Path('.') / logfile} cannot be found"