#NEWLINE# def archive_upload( self ) : #NEWLINE# #INDENT# if ( self . args . name is not None ) : #NEWLINE# #INDENT# name = self . args . name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# full_name = self . args . file . name #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise RuntimeError ( 'Archive name not specified. Use --name' ) #NEWLINE# #UNINDENT# name = os . path . basename ( full_name ) #NEWLINE# #UNINDENT# vault = self . connection . get_vault ( self . args . vault ) #NEWLINE# archive_id = vault . create_archive_from_file ( file_obj = self . args . file , description = name ) #NEWLINE# self . cache . add_archive ( self . args . vault , name , archive_id )