From c584b8dfa318fc409660b974671162a5af1f49ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Thu, 4 Sep 2014 17:07:51 +0200 Subject: [PATCH] format: workaround Python pre-2.7 limitation (Issue5982) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...making the test suite pass on RHEL 6 once again. Signed-off-by: Jan Pokorný --- format.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/format.py b/format.py index 8d35789..3f8487d 100644 --- a/format.py +++ b/format.py @@ -643,6 +643,7 @@ def get_bytestring(self, protocol): pretty_print=True) @SimpleFormat.producing(ETREE, protect=True, - validator=etree_validator.__func__) + # pre 2.7 compat: http://bugs.python.org/issue5982 + validator=etree_validator.__get__(1).im_func) def get_etree(self, protocol): return etree.fromstring(self.BYTESTRING()).getroottree()