Skip to content

Commit

Permalink
Fix shell hangs on checkconfig command when using http steps
Browse files Browse the repository at this point in the history
  • Loading branch information
madazone committed Apr 5, 2014
1 parent c39caee commit 9f9053e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion master/buildbot/steps/http.py
Expand Up @@ -65,11 +65,11 @@ class HTTPStep(BuildStep):
"timeout", "allow_redirects", "proxies",
"hooks", "stream", "verify", "cert"]
renderables = requestsParams
session = None

def __init__(self, url, method, description=None, descriptionDone=None, **kwargs):
if txrequests is None or requests is None:
config.error("Need to install txrequest to use this step:\n\n pip install txrequests")
self.session = getSession()
self.method = method
self.url = url
self.requestkwargs = {'method': method, 'url': url}
Expand All @@ -91,7 +91,11 @@ def start(self):

@defer.inlineCallbacks
def doRequest(self):
# create a new session if it doesn't exist
self.session = getSession()

log = self.addLog('log')

# known methods already tested in __init__

log.addHeader('Performing %s request to %s\n' % (self.method, self.url))
Expand Down

0 comments on commit 9f9053e

Please sign in to comment.