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

DataWatch does not return node data if allow_missing_node enabled #43

Closed
srwilson opened this issue Dec 20, 2012 · 2 comments
Closed

DataWatch does not return node data if allow_missing_node enabled #43

srwilson opened this issue Dec 20, 2012 · 2 comments

Comments

@srwilson
Copy link

When DataWatch has allow_missing_node enabled, the data argument given to the callback is always None

Test program:

import kazoo.client

c = kazoo.client.KazooClient(<host>)
c.start()

c.create('/testnode', 'DATA')

@c.DataWatch('/testnode', allow_missing_node=True)                                                                                                                                                                                                                                                                           
def signal_update(data, stat):                                                                                                                                                                                                                                                                                                                                    
    print data, stat

c.set('/testnode', 'NEW_DATA')

Prints:

None ZnodeStat(czxid=8591709603, mzxid=8591709603, ctime=1355968927708, mtime=1355968927708, version=0, cversion=0, aversion=0, ephemeralOwner=0, dataLength=4, numChildren=0, pzxid=8591709603)
None ZnodeStat(czxid=8591709603, mzxid=8591709604, ctime=1355968927708, mtime=1355968927712, version=1, cversion=0, aversion=0, ephemeralOwner=0, dataLength=8, numChildren=0, pzxid=8591709603)
@diranged
Copy link
Contributor

diranged commented Jan 8, 2013

I'm looking forward to seeing this fixed as well... :)

bbangert added a commit that referenced this issue Jan 9, 2013
@bbangert
Copy link
Member

bbangert commented Jan 9, 2013

I've tested that this actually fixes the issue, the tests were also quite broke.

@bbangert bbangert closed this as completed Jan 9, 2013
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

3 participants