Default use_proxy to True for fetch_url()
Also added some error handling to the fetch_url() call in the apt_repository module, so that failures to look up the PPA info are properly handled. Fixes #7322
This commit is contained in:
parent
3a8ebd4325
commit
792298f114
1 changed files with 2 additions and 0 deletions
|
@ -320,6 +320,8 @@ class UbuntuSourcesList(SourcesList):
|
|||
|
||||
headers = dict(Accept='application/json')
|
||||
response, info = fetch_url(self.module, lp_api, headers=headers)
|
||||
if info['status'] != 200:
|
||||
self.module.fail_json(msg="failed to fetch PPA information, error was: %s" % info['msg'])
|
||||
return json.load(response)
|
||||
|
||||
def _expand_ppa(self, path):
|
||||
|
|
Loading…
Reference in a new issue