def _SetOpEarlyRelease(early_release, op):
  """Sets C{early_release} flag on opcodes if available.

  """
  try:
    op.early_release = early_release
  except __HOLE__:
    assert not isinstance(op, opcodes.OpInstanceReplaceDisks)

  return op
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/_SetOpEarlyRelease