commit: 55943b69a42c292bc0922a22d71f9d992ea035e7
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: Wed May 4 06:08:50 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=55943b69
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 c76922b..8b31e3f 100644
--- a/pym/repoman/modules/scan/metadata/pkgmetadata.py
+++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py
@@ -102,7 +102,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",