def _ModifyList(l, value):
  """Adds or removes a value from a list.

  Args:
    l: list to modify.
    value: str value; "foo" to add or "-foo" to remove "foo".
  """
  if value.startswith('-'):
    try:
      l.remove(value[1:])
    except __HOLE__:
      pass  # item is already not a member of the list, so ignore error.
  else:
    l.append(value)
dataset/ETHPy150Open google/simian/src/simian/mac/munki/common.py/_ModifyList