From d71635379d9ec803fed0a0f63a8f780b283e887c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 14 Aug 2008 19:07:22 +0000 Subject: * Fix parse_metadata_use() to raise ParseError instead of the ExpatError that was reported by grobian. * Define __all__. svn path=/main/trunk/; revision=11407 --- pym/repoman/utilities.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index b537536bf..10f267272 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -6,6 +6,18 @@ """This module contains utility functions to help repoman find ebuilds to scan""" +__all__ = [ + "detect_vcs_conflicts", + "editor_is_executable", + "FindPackagesToScan", + "FindPortdir", + "format_qa_output", + "get_commit_message_with_editor", + "get_commit_message_with_stdin", + "have_profile_dir", + "parse_metadata_use" +] + import commands import errno import itertools @@ -15,6 +27,7 @@ import sys from xml.dom import minidom from xml.dom import NotFoundErr +from xml.parsers.expat import ExpatError from portage import output from portage.output import red, green from portage.process import find_binary @@ -97,7 +110,10 @@ def parse_metadata_use(mylines, uselist=None): returns a dict of the form a list of flags""" if uselist is None: uselist = [] - metadatadom = minidom.parse(mylines) + try: + metadatadom = minidom.parse(mylines) + except ExpatError, e: + raise exception.ParseError("metadata.xml: %s" % (e,)) try: usetag = metadatadom.getElementsByTagName("use") -- cgit v1.2.3-1-g7c22