Show More
@@ -132,6 +132,7 b' class VCSServerUnavailable(HTTPBadGatewa' | |||||
132 | 'Incorrect vcs.server=host:port', |
|
132 | 'Incorrect vcs.server=host:port', | |
133 | 'Incorrect vcs.server.protocol', |
|
133 | 'Incorrect vcs.server.protocol', | |
134 | ] |
|
134 | ] | |
|
135 | ||||
135 | def __init__(self, message=''): |
|
136 | def __init__(self, message=''): | |
136 | self.explanation = 'Could not connect to VCS Server' |
|
137 | self.explanation = 'Could not connect to VCS Server' | |
137 | if message: |
|
138 | if message: |
@@ -197,6 +197,13 b' def _remote_call(url, payload, exception' | |||||
197 | response = session.post(url, data=msgpack.packb(payload)) |
|
197 | response = session.post(url, data=msgpack.packb(payload)) | |
198 | except pycurl.error as e: |
|
198 | except pycurl.error as e: | |
199 | raise exceptions.HttpVCSCommunicationError(e) |
|
199 | raise exceptions.HttpVCSCommunicationError(e) | |
|
200 | except Exception as e: | |||
|
201 | message = getattr(e, 'message', '') | |||
|
202 | if 'Failed to connect' in message: | |||
|
203 | # gevent doesn't return proper pycurl errors | |||
|
204 | raise exceptions.HttpVCSCommunicationError(e) | |||
|
205 | else: | |||
|
206 | raise | |||
200 |
|
207 | |||
201 | if response.status_code >= 400: |
|
208 | if response.status_code >= 400: | |
202 | log.error('Call to %s returned non 200 HTTP code: %s', |
|
209 | log.error('Call to %s returned non 200 HTTP code: %s', |
General Comments 0
You need to be logged in to leave comments.
Login now