Change handle_httperror in httpapi plugins (#53391)

* Change return of handle_httperror

* Fix restconf for handle_httperror changes
This commit is contained in:
Nathaniel Case 2019-03-06 12:13:58 -05:00 committed by GitHub
parent 662dd2c1de
commit 3fe2013b3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 30 deletions

View file

@ -277,9 +277,9 @@ class Connection(NetworkConnectionBase):
if is_handled is True:
return self.send(path, data, **kwargs)
elif is_handled is False:
raise AnsibleConnectionFailure('Could not connect to {0}: {1}'.format(self._url + path, exc.reason))
else:
raise
else:
response = is_handled
except URLError as exc:
raise AnsibleConnectionFailure('Could not connect to {0}: {1}'.format(self._url + path, exc.reason))