From ede9a484b6555c01fce32383aa9b4e909c73c2eb Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Fri, 8 Jan 2010 21:38:33 +0000 Subject: [PATCH] Fix epkginfo to not traceback if herds.xml is not in the tree svn path=/trunk/gentoolkit/; revision=732 --- ChangeLog | 4 ++++ pym/gentoolkit/metadata.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 85f41f8..c68aef3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-01-08: Paul Varner + * epkginfo/equery: Fix expkinfo to not traceback if herds.xml is not + present in the tree. (Bug 300108) + 2009-12-17: Paul Varner * revdep-rebuild: Fix revdep-rebuild to properly honor PORTAGE_NICENESS as an incremental to the current nice level (Bug diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py index 02fe03f..33fdcaf 100644 --- a/pym/gentoolkit/metadata.py +++ b/pym/gentoolkit/metadata.py @@ -205,7 +205,10 @@ class MetaData(object): if self._herdstree is None: herds_path = os.path.join(settings['PORTDIR'], 'metadata/herds.xml') - self._herdstree = etree.parse(herds_path) + try: + self._herdstree = etree.parse(herds_path) + except IOError: + return None # Some special herds are not listed in herds.xml if herd in ('no-herd', 'maintainer-wanted', 'maintainer-needed'): -- 2.26.2