python: Check "buffer" when writing to sys.stdout for python2 compat.
authorTobias Mueller <muelli@cryptobitch.de>
Wed, 30 Nov 2016 22:08:47 +0000 (23:08 +0100)
committerJustus Winter <justus@g10code.com>
Thu, 1 Dec 2016 16:39:38 +0000 (17:39 +0100)
commitae21d2705fc46725e1f9af1651b68d16155d1501
treedec3a3f0b365883d684fcf48ab2a84fe4313c4a0
parent154389f2a5e4c13081cf0624222aad29ee480b56
python: Check "buffer" when writing to sys.stdout for python2 compat.

* lang/python/tests/support.py (print_data): Add check for buffer.
--

When running with something like make -C lang/python check verbose=2 the
test would fail under python2, because the file objects do not have a
buffer property.

Signed-off-by: Tobias Mueller <muelli@cryptobitch.de>
lang/python/tests/support.py