aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2016-05-03 23:08:50 -0700
committerBrian Dolbec <dolsen@gentoo.org>2016-05-14 11:29:40 -0700
commitcfc31c04bf6e1d59b2756e3ac315a2040cdd162d (patch)
treed9efa79a11e684013cf752ebdfd2babc0a8fa392
parentrepoman/modules/.../pkgmetadata.py: Have xml validation log all qatracker er... (diff)
downloadportage-cfc31c04bf6e1d59b2756e3ac315a2040cdd162d.tar.gz
portage-cfc31c04bf6e1d59b2756e3ac315a2040cdd162d.tar.bz2
portage-cfc31c04bf6e1d59b2756e3ac315a2040cdd162d.zip
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@binghamton.edu> Thank you
-rw-r--r--pym/repoman/modules/scan/metadata/pkgmetadata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py
index 83ca93f27..d8344c293 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",