def get_file_location(self, volume_id):
        """
        Get location for the file,
        WeedFS volume is choosed randomly

        :param integer volume_id: volume_id
        :rtype: namedtuple `FileLocation` `{"public_url":"", "url":""}`
        """
        url = ("http://{master_addr}:{master_port}/"
               "dir/lookup?volumeId={volume_id}").format(
            master_addr=self.master_addr,
            master_port=self.master_port,
            volume_id=volume_id)
        data = json.loads(self.conn.get_data(url))
        _file_location = random.choice(data['locations'])
        FileLocation = namedtuple('FileLocation', "public_url url")
        return FileLocation(_file_location['publicUrl'], _file_location['url'])
def get_file_location ( self , volume_id ) : url = ( "http://{master_addr}:{master_port}/" "dir/lookup?volumeId={volume_id}" ) . format ( master_addr = self . master_addr , master_port = self . master_port , volume_id = volume_id ) data = json . loads ( self . conn . get_data ( url ) ) _file_location = random . choice ( data [ 'locations' ] ) FileLocation = namedtuple ( 'FileLocation' , "public_url url" ) return FileLocation ( _file_location [ 'publicUrl' ] , _file_location [ 'url' ] )
Get location for the file,
        WeedFS volume is choosed randomly

        :param integer volume_id: volume_id
        :rtype: namedtuple `FileLocation` `{"public_url":"", "url":""}`