def rm_env(user, name):
 lst = list_tab(user)
 ret = 'absent'
 rm_ = None
 for ind in range(len(lst['env'])):
  if (name == lst['env'][ind]['name']):
   rm_ = ind
 if (rm_ is not None):
  lst['env'].pop(rm_)
  ret = 'removed'
 comdat = _write_cron_lines(user, _render_tab(lst))
 if comdat['retcode']:
  return comdat['stderr']
 return ret

def rm_env ( user , name ) : lst = list_tab ( user ) ret = 'absent' rm_ = None for ind in range ( len ( lst [ 'env' ] ) ) : if ( name == lst [ 'env' ] [ ind ] [ 'name' ] ) : rm_ = ind if ( rm_ is not None ) : lst [ 'env' ] . pop ( rm_ ) ret = 'removed' comdat = _write_cron_lines ( user , _render_tab ( lst ) ) if comdat [ 'retcode' ] : return comdat [ 'stderr' ] return ret
remove cron environment variable for a specified user .