FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Xubuntu User

 
 
LinkBack Thread Tools
 
Old 05-11-2012, 05:44 PM
David Lehman
 
Default Don't raise exceptions from groups, packages properties.

An empty list is more reasonable for something treated like a normal
attribute.
---
pyanaconda/packaging/yumpayload.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 6202a3e..f8e2b20 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -650,6 +650,7 @@ reposdir=%s
from yum.Errors import RepoError
from yum.Errors import GroupsError

+ groups = []
with _yum_lock:
if not self._groups:
if self.needsNetwork and not hasActiveNetDev():
@@ -659,9 +660,11 @@ reposdir=%s
self._groups = self._yum.comps
except (RepoError, GroupsError) as e:
log.error("failed to get group info: %s" % e)
- raise MetadataError(e.value)

- return [g.groupid for g in self._groups.get_groups()]
+ if self._groups:
+ groups = [g.groupid for g in self._groups.get_groups()]
+
+ return groups

def description(self, groupid):
""" Return name/description tuple for the group specified by id. """
@@ -713,7 +716,7 @@ reposdir=%s
try:
self._packages = self._yum.pkgSack.returnPackages()
except RepoError as e:
- raise MetadataError(e.value)
+ log.error("failed to get package list: %s" % e)

return self._packages

--
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org