#NEWLINE# def deleteFile( self , file ) : #NEWLINE# #INDENT# '\n        Only deletes the file if it is managed (i.e. not an imported file).\n        ' #NEWLINE# if ( not file [ 'hdfs' ] . get ( 'imported' ) ) : #NEWLINE# #INDENT# res = self . client . delete ( [ self . _absPath ( file ) ] ) . next ( ) #NEWLINE# if ( not res [ 'result' ] ) : #NEWLINE# #INDENT# raise Exception ( ( 'Failed to delete HDFS file %s: %s' % ( file [ 'path' ] , res . get ( 'error' ) ) ) )