#NEWLINE# def __call__( self , func ) : #NEWLINE# #INDENT# if ( self . logger is None ) : #NEWLINE# #INDENT# LOG = logging . getLogger ( func . __module__ ) #NEWLINE# self . logger = LOG . exception #NEWLINE# #UNINDENT# def call( * args , **kwargs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return func ( * args , ** kwargs ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# with excutils . save_and_reraise_exception ( ) : #NEWLINE# #INDENT# self . logger ( e ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return call