From 0518ebf199e8b481672030d7ba137c2d7a973156 Mon Sep 17 00:00:00 2001 From: Jerry Date: Fri, 6 Sep 2019 13:05:07 +0800 Subject: [PATCH] client.py: chdir --- client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client.py b/client.py index 2e01efb..59c852e 100755 --- a/client.py +++ b/client.py @@ -4,6 +4,7 @@ # This file is part of Buildbot by JerryXiao import logging +import os from multiprocessing.connection import Client from time import sleep @@ -15,6 +16,10 @@ from utils import print_exc_plus logger = logging.getLogger(f'buildbot.{__name__}') +abspath=os.path.abspath(__file__) +abspath=os.path.dirname(abspath) +os.chdir(abspath) + def run(funcname, args=list(), kwargs=dict(), retries=0, server=(REPOD_BIND_ADDRESS, REPOD_BIND_PASSWD)): try: logger.info('client: %s %s %s',funcname, args, kwargs) @@ -41,7 +46,6 @@ if __name__ == '__main__': from utils import configure_logger configure_logger(logger) def print_log(): - import os os.system(f'tail -n 43 -f \"{CONSOLE_LOGFILE}\"') try: actions = {