#NEWLINE# def upload( self , args ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# artifact = repositorytools . LocalArtifact ( local_path = args . local_file , group = args . group , artifact = args . artifact , version = args . version ) #NEWLINE# #UNINDENT# except repositorytools . NameVerDetectionError : #NEWLINE# #INDENT# logger . exception ( 'Unable to create instance of artifact.' ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# if args . staging : #NEWLINE# #INDENT# if ( not args . use_existing ) : #NEWLINE# #INDENT# return self . repository . upload_artifacts_to_new_staging ( [ artifact ] , args . repo_id , True , description = args . description , upload_filelist = args . upload_filelist ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . repository . upload_artifacts_to_staging ( [ artifact ] , args . repo_id , True , upload_filelist = args . upload_filelist ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return self . repository . upload_artifacts ( [ args ] , args . repo_id , True )