summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-09-04 17:07:51 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-09-04 17:08:34 +0200
commitc584b8dfa318fc409660b974671162a5af1f49ca (patch)
treec94f88fae1c94e843d453168171e53ceb8062b50
parente1115782a728a7e895e934e53d4d7067e2533b31 (diff)
downloadclufter-c584b8dfa318fc409660b974671162a5af1f49ca.tar.gz
clufter-c584b8dfa318fc409660b974671162a5af1f49ca.tar.xz
clufter-c584b8dfa318fc409660b974671162a5af1f49ca.zip
format: workaround Python pre-2.7 limitation (Issue5982)
...making the test suite pass on RHEL 6 once again. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--format.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/format.py b/format.py
index 8d35789..3f8487d 100644
--- a/format.py
+++ b/format.py
@@ -643,6 +643,7 @@ class XML(SimpleFormat):
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()