__hasattribute__ doesn't work with 3.6 (Pull Request #57)
CarlosSolrac opened this issue · 1 comments
CarlosSolrac commented
When "__hasattribute__" executes the line "return any(self.children, lambda x: x._name == name)" it fails with the error message: TypeError: any() takes exactly one argument (2 given)
My suggested fix is in pull request #57.
https://github.com/stchris/untangle/pull/57
Thank you in advance.
The issue can be reproduced with the following code snippet when running Python 3.6:
import untangle
o = untangle.parse('''
<root>
<child name="child1">
<subchild name="sub1"/>
</child>
<child name="child2"/>
<child name="child3">
<subchild name="sub2"/>
<subchild name="sub3"/>
</child>
</root>
''')
o.__hasattribute__('child')
Error message
TypeError: any() takes exactly one argument (2 given)
stchris commented
Thank you so much for your submission and your fix. I merged the PR and will include it in the next release.