From 74a27ffe52368d2248bec56037f7f565d288d697 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Thu, 30 Jul 2015 13:16:11 +0530 Subject: [PATCH] Simplify distribution test If it's Ubuntu, use UbuntuSourcesList; if it's any other apt-friendly distribution, use SourcesList; otherwise, fail. --- packaging/os/apt_repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/os/apt_repository.py b/packaging/os/apt_repository.py index 0e6140651e1..71f78e2970c 100644 --- a/packaging/os/apt_repository.py +++ b/packaging/os/apt_repository.py @@ -438,7 +438,7 @@ def main(): if isinstance(distro, aptsources_distro.UbuntuDistribution): sourceslist = UbuntuSourcesList(module, add_ppa_signing_keys_callback=get_add_ppa_signing_key_callback(module)) - elif isinstance(distro, aptsources_distro.DebianDistribution) or isinstance(distro, aptsources_distro.Distribution): + elif isinstance(distro, aptsources_distro.Distribution): sourceslist = SourcesList(module) else: module.fail_json(msg='Module apt_repository supports only Debian and Ubuntu.')