Ejemplo n.º 1
0
def install_state(version_tag, machine = E.LOCALHOST, rootdir = "/"):
  """
  This function returns the state of the install of version_num
  if it exists. Otherwise, it returns null.
  """
  filename = "%s/%s/STATE" % (get_top_dir(rootdir), str(version_tag))
  output = E.cat([machine], filename)
  if output == None:
    return None
  install_state = string.strip(output)
  if install_state not in INSTALL_STATES:
    return None
  return install_state