def valid_file_path(file_path): """Check that a file_path points to a valid file.""" try: cv.isfile(file_path) return True except vol.Invalid: _LOGGER.error("%s error: Invalid file path: %s", CLASSIFIER, file_path) return False
def has_adb_files(value): """Check that ADB key files exist.""" priv_key = value pub_key = '{}.pub'.format(value) cv.isfile(pub_key) return cv.isfile(priv_key)