def get_restart_mode(restart_file):
 if os.path.exists(restart_file):
  flag = open(restart_file, 'r').read()
  return (flag == 'True')
 return False

def get_restart_mode ( restart_file ) : if os . path . exists ( restart_file ) : flag = open ( restart_file , 'r' ) . read ( ) return ( flag == 'True' ) return False
parse the server/portal restart status .