'Send a PUT request'

def _do_put(self, uri, data):

    try:
        req = RequestWithMethod(uri)
        req.set_method('PUT')
        req.add_header('Content-Type', 'application/octet-stream')
        if (data is not None):
            req.add_data(data)
        return urllib2.urlopen(req).read()
    except urllib2.HTTPError as e:
        if (e.code == 412):
            raise ZooKeeper.WrongVersion(uri)
        raise
