def watcher(self, zh, event, state, path):
    """Handle zookeeper.aget() watches.

    This code is called when a znode changes and triggers a data watch.
    It is not called to handle the zookeeper.aget call itself.

    Numeric arguments map to constants. See ``DATA`` in ``help(zookeeper)``
    for more information.

    Args:
      zh Zookeeper handle that set this watch.
      event Event that caused the watch (often called ``type`` elsewhere).
      state Connection state.
      path Znode that triggered this watch.

    Does not provide a return value.
    """
    out = ['Running watcher:',
           'zh=%d' % zh,
           'event=%d' % event,
           'state=%d' % state,
           path % 'path=%s']
    logger.debug(' '.join(out))
    if event == zookeeper.CHANGED_EVENT and \
       state == zookeeper.CONNECTED_STATE and \
       self.znode == path:
      if zookeeper.OK != self.aget():
        logger.critical('Unable to get znode! Exiting.')
        sys.exit(1)
dataset/ETHPy150Open francelabs/datafari/debian7/zookeeper/contrib/zkpython/src/examples/watch_znode_for_changes.py/MyClass.watcher/swapped operands of `%`