(self, image)
TODO: Docstring for add_image

        @param image TODO 

        @return TODO
TODO: Docstring for add_image
TODO : Docstring for add_image
def add_image(self, image):
        """
        TODO: Docstring for add_image

        @param image TODO 

        @return TODO
        """
        image.persistent_manager = self
        basename = self.storage_path + '/' + str(image.identifier)
        metadata_path = basename + METADATA_EXT
        body_path = basename + BODY_EXT
        image.data = body_path
        try:
            if not os.path.isfile(metadata_path):
                open(metadata_path, 'w').close()
                self.log.debug('Created file %s' % metadata_path)
            if not os.path.isfile(body_path):
                open(body_path, 'w').close()
                self.log.debug('Created file %s' % body_path)
        except IOError as e:
            self.log.debug('Exception caught: %s' % e)

        self.save_image(image)
def add_image ( self , image ) : image . persistent_manager = self basename = self . storage_path + '/' + str ( image . identifier ) metadata_path = basename + METADATA_EXT body_path = basename + BODY_EXT image . data = body_path try : if not os . path . isfile ( metadata_path ) : open ( metadata_path , 'w' ) . close ( ) self . log . debug ( 'Created file %s' % metadata_path ) if not os . path . isfile ( body_path ) : open ( body_path , 'w' ) . close ( ) self . log . debug ( 'Created file %s' % body_path ) except IOError as e : self . log . debug ( 'Exception caught: %s' % e ) self . save_image ( image )