(self, path)
return doc
Execute a Mesos API call.
Execute a Mesos API call.
Execute a Mesos API call .
def _get(self, path):
        """
        Execute a Mesos API call.
        """
        url = self._get_url(path)
        try:
            response = urllib2.urlopen(url)
        except Exception as err:
            self.log.error("%s: %s", url, err)
            return False

        try:
            doc = json.load(response)
        except (TypeError, ValueError):
            self.log.error("Unable to parse response from Mesos as a"
                           " json object")
            return False

        return doc
def _get ( self , path ) : url = self . _get_url ( path ) try : response = urllib2 . urlopen ( url ) except Exception as err : self . log . error ( "%s: %s" , url , err ) return False try : doc = json . load ( response ) except ( TypeError , ValueError ) : self . log . error ( "Unable to parse response from Mesos as a" " json object" ) return False return doc