From b96164fe93dd0fdb2960130cefd9f2d1346cd1bf Mon Sep 17 00:00:00 2001 From: Jerry Date: Sat, 7 Sep 2019 13:00:01 +0800 Subject: [PATCH] client: forgot debug --- client.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client.py b/client.py index 1fcd964..d295f4c 100755 --- a/client.py +++ b/client.py @@ -45,8 +45,11 @@ if __name__ == '__main__': import argparse from utils import configure_logger configure_logger(logger) - def print_log(): - os.system(f'tail -n 43 -f \"{CONSOLE_LOGFILE}\"') + def print_log(debug=False): + if debug: + os.system(f'tail -n 43 -f \"buildbot.log\"') + else: + os.system(f'tail -n 43 -f \"{CONSOLE_LOGFILE}\"') try: actions = { 'info': 'show buildbot info', @@ -113,7 +116,7 @@ if __name__ == '__main__': logger.info(run('force_upload', args=(p,), kwargs={'overwrite': args.overwrite}, server=server)) elif action[0] == 'log': logger.info('printing logs') - print_log() + print_log(debug=args.debug) else: parser.error("Please choose an action") except Exception: