summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-05-22 18:26:51 +0100
committerRichard Hughes <richard@hughsie.com>2008-05-22 18:26:51 +0100
commit27db53a5b77188b8283af8232ab7262ef26fb363 (patch)
tree9cc302354c39bb633ef12d24cd10ca91a492cc6f
parent060a1ccd4095c52db975104746b16c4a5bc6b34b (diff)
report to the user when the comps groups are invalid. Might help fix bugs like rh#447162
-rw-r--r--backends/yum/helpers/yumBackend.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 3a39014c8..7f49ae182 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -434,6 +434,8 @@ class PackageKitYumBackend(PackageKitBaseBackend):
def _buildGroupDict(self):
pkgGroups= {}
cats = self.yumbase.comps.categories
+ if len(cats) == 0:
+ self.error(ERROR_GROUP_NOT_FOUND,'comps categories could not be loaded')
for cat in cats:
grps = map(lambda x: self.yumbase.comps.return_group(x),
filter(lambda x: self.yumbase.comps.has_group(x),cat.groups))