[PATCH 2/2] dts: clean up config types

Juraj Linkeš juraj.linkes at pantheon.tech
Mon May 13 18:12:01 CEST 2024


> diff --git a/dts/framework/testbed_model/traffic_generator/__init__.py b/dts/framework/testbed_model/traffic_generator/__init__.py
> @@ -39,8 +39,8 @@ def create_traffic_generator(
>      Returns:
>          A traffic generator capable of capturing received packets.
>      """
> -    match traffic_generator_config.traffic_generator_type:
> -        case TrafficGeneratorType.SCAPY:
> +    match traffic_generator_config:
> +        case ScapyTrafficGeneratorConfig():
>              return ScapyTrafficGenerator(tg_node, traffic_generator_config)
>          case _:
>              raise ConfigurationError(

Just one minor ask, could you fix the error string to an f-string?


More information about the dev mailing list