def get(self, timeout=None): """Get an item from the queue or return None.""" if timeout is None: timeout = get_NS().qb_zookeeper_timeout return util.frombytes(self._q.get(timeout=timeout))
def get(path): try: return util.frombytes(raw_client().get(path)[0]) except NoNodeError as err: raise exceptions.NoNodeError("%s: %s" % (path, err))