#NEWLINE# def cancelUpload( self , upload ) : #NEWLINE# #INDENT# absPath = self . _absPath ( upload ) #NEWLINE# if self . client . test ( absPath , exists = True ) : #NEWLINE# #INDENT# res = self . client . delete ( [ absPath ] ) . next ( ) #NEWLINE# if ( not res [ 'result' ] ) : #NEWLINE# #INDENT# raise Exception ( ( 'Failed to delete HDFS file %s: %s' % ( res [ 'path' ] , res . get ( 'error' ) ) ) )