#NEWLINE# def upload_file( self , session , output , serverdir ) : #NEWLINE# #INDENT# '\n        Upload a file to koji\n\n        :return: str, pathname on server\n        ' #NEWLINE# name = output . metadata [ 'filename' ] #NEWLINE# self . log . debug ( 'uploading %r to %r as %r' , output . file . name , serverdir , name ) #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( self . blocksize is not None ) : #NEWLINE# #INDENT# kwargs [ 'blocksize' ] = self . blocksize #NEWLINE# #UNINDENT# session . uploadWrapper ( output . file . name , serverdir , name = name , ** kwargs ) #NEWLINE# path = os . path . join ( serverdir , name ) #NEWLINE# self . log . debug ( 'uploaded %r' , path ) #NEWLINE# return path