In oldish versions of Python, it was possible to check for `None` by
simply saying `if not X`, while the newer way would explicitly check `if
X is None`. Use the latter way of asking for None, which has been
supported at least since Python 2.6.
#
refpurpose = ""
section = refentry.find("refnamediv")
- if not section:
+ if section is None:
logg.warning("no <refnamediv> found in <refentry> for '%s', bad docbook?", refentrytitle)
if not refentrytitle: raise Exception("not even a refentrytitle")
manpages = [ refentrytitle ]