commit: b1a831bffd28fc1bb889cc90bb7690c7e5e2b8d9 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Wed May 4 06:08:50 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=b1a831bf
repoman/modules/.../pkgmetadata.py: Fix failed missing doctype detection The docinfo is always created, so is not valid to use like a boolean to detect a missing doctype. doctype is a null string or equivalent and as such the correct choice for the if statement. Failure discoverd by: Göktürk Yüksek <gokturk <AT> binghamton.edu> Thank you pym/repoman/modules/scan/metadata/pkgmetadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py index 83ca93f..d8344c2 100644 --- a/pym/repoman/modules/scan/metadata/pkgmetadata.py +++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py @@ -106,7 +106,7 @@ class PkgMetadata(ScanBase, USEFlagChecks): "xml declaration encoding should be '%s', not '%s'" % (xpkg, metadata_xml_encoding, xml_encoding)) - if not _metadata_xml.docinfo: + if not _metadata_xml.docinfo.doctype: metadata_bad = True self.qatracker.add_error( "metadata.bad",