
On Thu, 2017-01-05 at 10:54 +0100, Martin Kletzander wrote:
Yeah, I'm not great at Python. Oh, so that's why there's not print(), just sys.stdout.write()... =)
AFAIK Python 2's print statement and Python 3's print() function are not entirely comparable, eg. there's no obvious way to use print to display a string that's already newline-terminated without Python adding one extra newline and still have the code run on both major Python versions, whereas sys.stdout.write() doesn't have the same issue. I could be entirely wrong though :)
I'm not going to comment on the python style, for me it's enough that it works now, it can be made more python-ish later on.
Works for me ;) [...]
+NEWS: $(srcdir)/docs/NEWS.xsl $(srcdir)/docs/news.xml $(srcdir)/docs/reformat-news.py This ^^ and + $(AM_V_GEN) \ + if [ -x $(XSLTPROC) ]; then \ + $(XSLTPROC) --nonet $(srcdir)/docs/NEWS.xsl $(srcdir)/docs/news.xml >$@-tmp \ ^^ this fails (. Do you even) syntax-check.
I quite clearly didn't. Will fix. -- Andrea Bolognani / Red Hat / Virtualization