def in_logbook()

in source/env_setup.py [0:0]


def in_logbook(hostname: str, executable: str) -> bool:
    if LOGBOOK_FILE.is_file():
        with open(LOGBOOK_FILE, 'r') as f:
            logbook = json.load(f)
        for entry in logbook:
            if (entry['hostname'] == hostname) and (entry['executable'] == executable):
                return True
        logging.debug('Could not find a matching entry in logbook.')
        return False
    else:
        logging.debug(f'Could not find logbook at {LOGBOOK_FILE}.')
        return False