def _sysfs_attr(name, value=None, log_lvl=None, log_msg=None):
 if isinstance(name, six.string_types):
  name = [name]
 res = __salt__['sysfs.attr'](os.path.join(*name), value)
 if ((not res) and (log_lvl is not None)):
  log.log(LOG[log_lvl], log_msg)
 return res

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