def get_storage_name(self, names, remove_dir=False):
    '''use a parsed names dictionary from get_image_name (above) to return
       the path in storage based on the user's preferences

       Parameters
       ==========
       names: the output from parse_image_name
    '''
    storage_folder = os.path.dirname(names['storage'])

    # If the client doesn't have a database, default to PWD
    if not hasattr(self, 'storage'):
        return os.path.basename(names['storage'])
        
    storage_folder = "%s/%s" %(self.storage, storage_folder)
    mkdir_p(storage_folder)
    file_name = names['storage'].replace('/','-')
    storage_path = "%s/%s" %(self.storage, file_name)
    if remove_dir is True:
        return file_name
    return storage_path
def get_storage_name(self, names, remove_dir=False):
    '''use a parsed names dictionary from get_image_name (above) to return
       the path in storage based on the user's preferences

       Parameters
       ==========
       names: the output from parse_image_name
    '''
    storage_folder = os.path.dirname(names['storage'])

    # If the client doesn't have a database, default to PWD
    if not hasattr(self, 'storage'):
        return os.path.basename(names['storage'])
        
    storage_folder = "%s/%s" %(self.storage, storage_folder)
    mkdir_p(storage_folder)
    file_name = names['storage'].replace('/','-')
    storage_path = "%s/%s" %(self.storage, file_name)
    if remove_dir is True:
        return file_name
    return storage_path
def get_storage_name ( self , names , remove_dir = False ) : storage_folder = os . path . dirname ( names [ 'storage' ] ) # If the client doesn't have a database, default to PWD if not hasattr ( self , 'storage' ) : return os . path . basename ( names [ 'storage' ] ) storage_folder = "%s/%s" % ( self . storage , storage_folder ) mkdir_p ( storage_folder ) file_name = names [ 'storage' ] . replace ( '/' , '-' ) storage_path = "%s/%s" % ( self . storage , file_name ) if remove_dir is True : return file_name return storage_path
use a parsed names dictionary from get_image_name (above) to return
       the path in storage based on the user's preferences

       Parameters
       ==========
       names: the output from parse_image_name
use a parsed names dictionary from get_image_name ( above ) to return the path in storage based on the user s preferences