From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/metadata/
Date: Sun, 8 May 2016 21:21:15 +0000 (UTC) [thread overview]
Message-ID: <1462742322.4d2cb398e48cdd90499dee48d52072e147c64e0f.dolsen@gentoo> (raw)
commit: 4d2cb398e48cdd90499dee48d52072e147c64e0f
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue May 3 17:38:19 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun May 8 21:18:42 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4d2cb398
repoman/modules/.../pkgmetadata.py: Improve whole document validation
Change to using assertValid() and add the error causing validation to fail to the qa tracker
error.
pym/repoman/modules/scan/metadata/pkgmetadata.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py
index 4921b6f..1594b27 100644
--- a/pym/repoman/modules/scan/metadata/pkgmetadata.py
+++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py
@@ -206,8 +206,14 @@ class PkgMetadata(ScanBase, USEFlagChecks):
# Only carry out if in package directory or check forced
if not metadata_bad:
validator = etree.XMLSchema(file=self.metadata_xsd)
- if not validator.validate(_metadata_xml):
- self.qatracker.add_error("metadata.bad", xpkg + "/metadata.xml")
+ try:
+ validator.assertValid(_metadata_xml)
+ except etree.DocumentInvalid as error:
+ self.qatracker.add_error(
+ "metadata.bad",
+ xpkg + "/metadata.xml: %s"
+ % (str(error))
+ )
del metadata_bad
self.muselist = frozenset(self.musedict)
return False
next reply other threads:[~2016-05-08 21:21 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-08 21:21 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-14 18:33 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/metadata/ Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-05 16:06 Brian Dolbec
2016-05-05 16:02 Brian Dolbec
2016-05-04 6:24 Brian Dolbec
2016-05-04 6:09 Brian Dolbec
2016-05-04 3:45 Brian Dolbec
2016-05-03 20:58 Brian Dolbec
2016-05-03 20:58 Brian Dolbec
2016-05-03 17:43 Brian Dolbec
2016-05-03 17:43 Brian Dolbec
2016-05-03 9:33 Brian Dolbec
2016-05-03 9:33 Brian Dolbec
2016-05-03 9:33 Brian Dolbec
2016-05-03 9:33 Brian Dolbec
2016-05-03 9:33 Brian Dolbec
2016-04-25 15:32 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-03-15 19:00 Brian Dolbec
2016-01-06 4:21 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462742322.4d2cb398e48cdd90499dee48d52072e147c64e0f.dolsen@gentoo \
--to=dolsen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox