From 163547429ebdd202708567de633c5fcbdf9cf085 Mon Sep 17 00:00:00 2001 From: James Westby Date: Wed, 10 Sep 2008 19:30:23 +0100 Subject: [PATCH] apt: handle inconsistent source repo state. If deb-src lines aren't available for every deb line then softwareproperties will report it as inconsistent, with None. The apt backend tried to pass this directly as the "enabled" parameter, which fails as it should be able to be considered an integer. We instead substitute False. Thanks to Baptiste Mille-Mathias for reporting and testing. --- backends/apt/aptDBUSBackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/apt/aptDBUSBackend.py b/backends/apt/aptDBUSBackend.py index 2cfe72d12..79fe73b03 100755 --- a/backends/apt/aptDBUSBackend.py +++ b/backends/apt/aptDBUSBackend.py @@ -827,7 +827,7 @@ class PackageKitAptBackend(PackageKitBaseBackend): # Emit distro's virtual source code repositoriy if not FILTER_NOT_DEVELOPMENT in filter_list: repo_id = "%s_source" % repos.distro.id - enabled = repos.get_source_code_state() + enabled = repos.get_source_code_state() or False #FIXME: no translation :( description = "%s %s - Source code" % (repos.distro.id, repos.distro.release)