sregistry/main/google_build/delete.py
def delete(self, name):
    '''delete an image from Google Storage.

       Parameters
       ==========
       name: the name of the file (or image) to delete

    '''

    bot.debug("DELETE %s" % name)

    for file_object in files:
        if isinstance(file_object, dict):
            if "kind" in file_object:
                if file_object['kind'] == "storage#object":
                    object_name = "/".join(file_object['id'].split('/')[:-1])
                    object_name = re.sub('%s/' %self._bucket['name'],'', object_name,1)

                    delete_object(service=self._bucket_service,
                                  bucket_name=bucket['name'],
                                  object_name=object_name)
def delete(self, name):
    '''delete an image from Google Storage.

       Parameters
       ==========
       name: the name of the file (or image) to delete

    '''

    bot.debug("DELETE %s" % name)

    for file_object in files:
        if isinstance(file_object, dict):
            if "kind" in file_object:
                if file_object['kind'] == "storage#object":
                    object_name = "/".join(file_object['id'].split('/')[:-1])
                    object_name = re.sub('%s/' %self._bucket['name'],'', object_name,1)

                    delete_object(service=self._bucket_service,
                                  bucket_name=bucket['name'],
                                  object_name=object_name)
def delete ( self , name ) : bot . debug ( "DELETE %s" % name ) for file_object in files : if isinstance ( file_object , dict ) : if "kind" in file_object : if file_object [ 'kind' ] == "storage#object" : object_name = "/" . join ( file_object [ 'id' ] . split ( '/' ) [ : - 1 ] ) object_name = re . sub ( '%s/' % self . _bucket [ 'name' ] , '' , object_name , 1 ) delete_object ( service = self . _bucket_service , bucket_name = bucket [ 'name' ] , object_name = object_name )
delete an image from Google Storage.

       Parameters
       ==========
       name: the name of the file (or image) to delete
delete an image from Google Storage .