2019-11-15 01:23:10 +00:00
|
|
|
#!/usr/bin/python3
|
2018-11-02 21:39:02 +00:00
|
|
|
from __future__ import print_function
|
|
|
|
import sys
|
2018-11-02 19:33:57 +00:00
|
|
|
import requests
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
req = requests.get('https://bodhi.fedoraproject.org/composes/')
|
|
|
|
bodhi_composes = req.json()
|
|
|
|
|
|
|
|
if len(bodhi_composes['composes']) == 0:
|
2018-11-02 21:39:02 +00:00
|
|
|
bodhi_push_cmd = ['bodhi-push', '--username', 'releng']
|
|
|
|
push = subprocess.Popen(bodhi_push_cmd, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
2019-11-15 01:23:10 +00:00
|
|
|
push.stdin.write(b'y')
|
2018-11-02 21:39:02 +00:00
|
|
|
_, err = push.communicate()
|
|
|
|
push.wait()
|
|
|
|
if push.returncode != 0:
|
|
|
|
print(err, file=sys.stderr)
|
|
|
|
sys.exit(1)
|