def get_master_ip(self):
    """ Gets the master database IP of the current AppScale deployment.
    
    Returns: 
      The master DB IP
    """

    try:
      master_ip = self.__master_ip
    except __HOLE__:
      master_ip = None

    if master_ip is None:
      master_ip = os.environ.get("MASTER_IP")

      if master_ip is None:
        raise Exception("Env var MASTER_IP was not set.")
      else:
        self.__master_ip = master_ip

    return self.__master_ip
dataset/ETHPy150Open AppScale/appscale/AppDB/dbinterface_batch.py/AppDBInterface.get_master_ip