Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Only ping buildbot if it exists #16

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions homu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,12 @@ def parse_commands(body, username, repo_cfg, state, my_username, db, states, *,
state.save()

elif word == 'force' and realtime:
with buildbot_sess(repo_cfg) as sess:
res = sess.post(repo_cfg['buildbot']['url'] + '/builders/_selected/stopselected', allow_redirects=False, data={
'selected': repo_cfg['buildbot']['builders'],
'comments': INTERRUPTED_BY_HOMU_FMT.format(int(time.time())),
})
if 'buildbot' in repo_cfg:
with buildbot_sess(repo_cfg) as sess:
res = sess.post(repo_cfg['buildbot']['url'] + '/builders/_selected/stopselected', allow_redirects=False, data={
'selected': repo_cfg['buildbot']['builders'],
'comments': INTERRUPTED_BY_HOMU_FMT.format(int(time.time())),
})

if 'authzfail' in res.text:
err = 'Authorization failed'
Expand Down