summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2010-01-08 21:38:33 +0000
committerfuzzyray <fuzzyray@gentoo.org>2010-01-08 21:38:33 +0000
commitede9a484b6555c01fce32383aa9b4e909c73c2eb (patch)
tree80701ec231094360a54c71d8598fc7313693ff23
parentdc9f7175ec7ca6afc524e76786d2f46fb2c82229 (diff)
downloadgentoolkit-ede9a484b6555c01fce32383aa9b4e909c73c2eb.tar.gz
Fix epkginfo to not traceback if herds.xml is not in the tree
svn path=/trunk/gentoolkit/; revision=732
-rw-r--r--ChangeLog4
-rw-r--r--pym/gentoolkit/metadata.py5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 85f41f8..c68aef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-08: Paul Varner <fuzzyray@gentoo.org>
+ * epkginfo/equery: Fix expkinfo to not traceback if herds.xml is not
+ present in the tree. (Bug 300108)
+
2009-12-17: Paul Varner <fuzzyray@gentoo.org>
* 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'):