From 858b3da2ae1636a6343d0433a286f13bd70dc644 Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Sat, 19 Oct 2013 14:41:00 +0100 Subject: [PATCH] check for ubuntu distribution first --- packaging/apt_repository | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/apt_repository b/packaging/apt_repository index 55994ed824f..c77a644fae7 100644 --- a/packaging/apt_repository +++ b/packaging/apt_repository @@ -349,11 +349,11 @@ def main(): update_cache = module.params['update_cache'] sourceslist = None - if isinstance(distro, aptsources.distro.DebianDistribution) or \ + if isinstance(distro, aptsources.distro.UbuntuDistribution): + sourceslist = UbuntuSourcesList(add_ppa_signing_keys_callback=get_add_ppa_signing_key_callback(module)) + elif isinstance(distro, aptsources.distro.DebianDistribution) or \ isinstance(distro, aptsources.distro.Distribution): sourceslist = SourcesList() - elif isinstance(distro, aptsources.distro.UbuntuDistribution): - sourceslist = UbuntuSourcesList(add_ppa_signing_keys_callback=get_add_ppa_signing_key_callback(module)) else: module.fail_json(msg='Module apt_repository supports only Debian and Ubuntu.')