From: fuzzyray Date: Fri, 8 Jan 2010 21:38:33 +0000 (-0000) Subject: Fix epkginfo to not traceback if herds.xml is not in the tree X-Git-Tag: gentoolkit-0.3.0_rc10~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ede9a484b6555c01fce32383aa9b4e909c73c2eb;p=gentoolkit.git Fix epkginfo to not traceback if herds.xml is not in the tree svn path=/trunk/gentoolkit/; revision=732 --- 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'):