From 9d71e68de000d94ac627e40a7e53e77d6e53ac9a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 26 Aug 2010 12:46:35 -0700 Subject: Fix up error handling for egencache --update-use-local-desc. --- pym/repoman/utilities.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pym/repoman') diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index ed0de4449..b2d17fc9a 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -131,11 +131,15 @@ def parse_metadata_use(xml_tree): for flag in flags: pkg_flag = flag.get("name") - pkg_flag_value = whitespace_re.sub(' ', flag.text).strip() if pkg_flag is None: raise exception.ParseError("missing 'name' attribute for 'flag' tag") + if flag.text is None: + raise exception.ParseError("missing USE description with " + \ + "the 'flag' tag (name=%s)" % pkg_flag) + pkg_flag_value = whitespace_re.sub(' ', flag.text).strip() if not pkg_flag_value: - raise exception.ParseError("missing USE description with the 'flag' tag") + raise exception.ParseError("missing USE description with " + \ + "the 'flag' tag (name=%s)" % pkg_flag) uselist[pkg_flag] = pkg_flag_value return uselist -- cgit v1.2.3-1-g7c22