import logging


def app_is_deployed(app_id, zk_client):
  """ Looks for the app directory in the deployed apps location.

  Args:
    app_id: A str, the application ID.
  Returns:
    True on success, False otherwise.
  """
  if not zk_client.exists('/appscale/projects/{}'.format(app_id)):
    logging.error("Seems that \"{0}\" is not deployed.".format(app_id))
    logging.info("Please deploy \"{0}\" and try again.".\
      format(app_id))
    return False
  return True