apt_repository: check attribute repo for None value (#36944)

This commit is contained in:
Julien Vey 2018-03-19 15:16:43 +01:00 committed by ansibot
commit 26d9de6f3e
2 changed files with 25 additions and 0 deletions

View file

@ -503,6 +503,9 @@ def main():
else:
module.fail_json(msg='%s is not installed, and install_python_apt is False' % PYTHON_APT)
if not repo:
module.fail_json(msg='Please set argument \'repo\' to a non-empty value')
if isinstance(distro, aptsources_distro.Distribution):
sourceslist = UbuntuSourcesList(module, add_ppa_signing_keys_callback=get_add_ppa_signing_key_callback(module))
else: