summaryrefslogtreecommitdiffstats
path: root/pym/repoman/utilities.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-14 19:07:22 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-14 19:07:22 +0000
commitd71635379d9ec803fed0a0f63a8f780b283e887c (patch)
treea184c069999ac5063a6ec86cdc57713f53076106 /pym/repoman/utilities.py
parent733ea688c0ae837c209b7983c193e490012d3307 (diff)
downloadportage-d71635379d9ec803fed0a0f63a8f780b283e887c.tar.gz
portage-d71635379d9ec803fed0a0f63a8f780b283e887c.tar.bz2
portage-d71635379d9ec803fed0a0f63a8f780b283e887c.zip
* Fix parse_metadata_use() to raise ParseError instead of the ExpatError
that was reported by grobian. * Define __all__. svn path=/main/trunk/; revision=11407
Diffstat (limited to 'pym/repoman/utilities.py')
-rw-r--r--pym/repoman/utilities.py18
1 files changed, 17 insertions, 1 deletions
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")