Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__hasattribute__ doesn't work with 3.6 (Pull Request #57) #58

Closed
CarlosSolrac opened this issue Jun 26, 2018 · 1 comment
Closed

__hasattribute__ doesn't work with 3.6 (Pull Request #57) #58

CarlosSolrac opened this issue Jun 26, 2018 · 1 comment

Comments

@CarlosSolrac
Copy link
Contributor

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
Copy link
Owner

stchris commented Nov 18, 2019

Thank you so much for your submission and your fix. I merged the PR and will include it in the next release.

@stchris stchris closed this as completed Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants