def config_wrapper(ret: Any) -> None: if ret.name == "DOWNLOAD_DELEGATE" and ret.value is not None: try: driver_cls: Type[BaseDownloadService] = stevedore.DriverManager( namespace=namespace.DOWNLOAD_DELEGATE, name=ret.value, invoke_on_load=False, ).driver driver_cls.check_dep() except NoMatches: entry_points = importlib_metadata.entry_points( group=namespace.DOWNLOAD_DELEGATE) available = ", ".join([f"'{x.name}'" for x in entry_points]) print_error(f"{ret.value} if not a registered download delegate\n" f"available download delegate are {available}") result = config(ret.name, ret.value) if (not ret.name) and (not ret.value): print(result["message"]) else: globals()["print_{}".format(result["status"])](result["message"])
def config_wrapper(ret): result = config(ret.name, ret.value) if (not ret.name) and (not ret.value): print(result['message']) else: globals()["print_{}".format(result['status'])](result['message'])
def config_wrapper(ret: Any) -> None: result = config(ret.name, ret.value) if (not ret.name) and (not ret.value): print(result["message"]) else: globals()["print_{}".format(result["status"])](result["message"])