From 091b697967b9a3331ed5b90f3d1a2d18a716ec30 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 8 Sep 2019 17:14:43 +0800 Subject: [PATCH] client.py: change dir first --- client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client.py b/client.py index 9ef418a..9f6526b 100755 --- a/client.py +++ b/client.py @@ -8,6 +8,10 @@ import os from multiprocessing.connection import Client from time import sleep +abspath=os.path.abspath(__file__) +abspath=os.path.dirname(abspath) +os.chdir(abspath) + from config import REPOD_BIND_ADDRESS, REPOD_BIND_PASSWD, \ MASTER_BIND_ADDRESS, MASTER_BIND_PASSWD, \ CONSOLE_LOGFILE, MAIN_LOGFILE @@ -16,9 +20,6 @@ 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: