diff --git a/client.py b/client.py index d295f4c..5ffe130 100755 --- a/client.py +++ b/client.py @@ -54,10 +54,10 @@ if __name__ == '__main__': actions = { 'info': 'show buildbot info', 'update': '[--overwrite] update pushed files to the repo', - 'clean': '[dir / all] checkout pkgbuilds in packages', - 'rebuild': '[dir1 dir2 --clean] rebuild packages', - 'log': '[--debug] print log', - 'upload': '[dir1 dir2] force upload packages', + 'clean': '[dir / all] checkout pkgbuilds in packages', + 'rebuild': '[dir1 dir2 --clean] rebuild packages', + 'log': '[--debug] print log', + 'upload': '[dir1 dir2 --overwrite] force upload packages', 'getup': 'check for updates now' } parser = argparse.ArgumentParser(description='Client for buildbot', @@ -86,7 +86,7 @@ if __name__ == '__main__': logger.info(run('getup', server=server)) elif action[0] == 'update': server=(REPOD_BIND_ADDRESS, REPOD_BIND_PASSWD) - logger.info(run('update', kwargs={'overwrite': False}, server=server)) + logger.info(run('update', kwargs={'overwrite': args.overwrite}, server=server)) elif action[0] == 'clean': if len(action) <= 1: print('Error: Need package name') diff --git a/notify.py b/notify.py index 682a494..c96e9c6 100644 --- a/notify.py +++ b/notify.py @@ -6,6 +6,7 @@ import logging from utils import background, print_exc_plus, configure_logger +import subprocess logger = logging.getLogger(f'buildbot.{__name__}') @@ -13,4 +14,7 @@ logger = logging.getLogger(f'buildbot.{__name__}') # does nothing @background def send(content): - pass + try: + subprocess.run(['python', 'tgapi.py', str(content)], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + except: + pass