#NEWLINE# def _sysfs_attr( name , value = None , log_lvl = None , log_msg = None ) : #NEWLINE# #INDENT# '\n    Simple wrapper with logging around sysfs.attr\n    ' #NEWLINE# if isinstance ( name , six . string_types ) : #NEWLINE# #INDENT# name = [ name ] #NEWLINE# #UNINDENT# res = __salt__ [ 'sysfs.attr' ] ( os . path . join ( * name ) , value ) #NEWLINE# if ( ( not res ) and ( res is not None ) ) : #NEWLINE# #INDENT# log . log ( LOG [ log_lvl ] , log_msg ) #NEWLINE# #UNINDENT# return res