8000 Adds missing magic method __nonzero__ by claudiubelu · Pull Request #1 · tjguk/wmi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adds missing magic method __nonzero__ #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

claudiubelu
Copy link

This is called each time this object is an argument to a
conditional statement. If this method is not present,
getattr would be called instead. That would cause an
endless recursive call. Strangely, this was not an issue
before.

Error encountered running:
conn = wmi.WMI(moniker='//./root/MSCluster')
conn.MSCluster_Cluster

Also, this should improve performance as well,
since it avoids useless recursive calls.

This is called each time this object is an argument to a
conditional statement. If this method is not present,
__getattr__ would be called instead. That would cause an
endless recursive call. Strangely, this was not an issue
before.

Error encountered running:
conn = wmi.WMI(moniker='//./root/MSCluster')
conn.MSCluster_Cluster

Also, this should improve performance as well,
since it avoids useless recursive calls.
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

Successfully merging this pull request may close these issues.

1 participant
0