Python 3 fixes for apt_* modules. (#4754)

This commit is contained in:
Matt Clay 2016-09-08 17:56:09 -07:00
parent d339004437
commit e8f70f25df
3 changed files with 7 additions and 5 deletions

View file

@ -374,7 +374,7 @@ class UbuntuSourcesList(SourcesList):
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)
return json.loads(to_native(response.read()))
def _expand_ppa(self, path):
ppa = path.split(':')[1]