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.
This commit is contained in:
parent
9161d1593d
commit
163547429e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user