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

fix: #26 check existence of datapoint.poller.func #78

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

Conversation

kadaliao
Copy link

@kadaliao kadaliao commented Nov 1, 2020

ElementType always creates a dummy poller for those Datapoints without function. (

poller = Poller(pollers[k], lookup)
)

So self.poller is not None in Data.__get__ will never be True. (

if self.poller is None:
)

It causes problem like #26

Check self.poller.func is not None instead will fix it.

@kadaliao
Copy link
Author

kadaliao commented Nov 1, 2020

And should return the default value for Datapoint if there is no data and no poller function.

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