[chirp_devel] Issue with mem.immutable and exporting to CSV files

Jim Unroe
Sun Feb 13 11:18:12 PST 2022


Dan and Chirp-Devel,

On Sun, Feb 13, 2022 at 1:32 PM Dan Smith via chirp_devel
<chirp_devel at intrepid.danplanet.com> wrote:
> So, tl;dr; I think this is the change you want, which fixes the case you're talking about, but also probably for any other potential case where the import logic needs to tweak an immutable field for whatever radio it's importing from or exporting to:
>
>
> diff --git a/chirp/import_logic.py b/chirp/import_logic.py
> index c2ed867d..cc6a3662 100644
> --- a/chirp/import_logic.py
> +++ b/chirp/import_logic.py
> @@ -203,6 +203,10 @@ def import_mem(dst_radio, src_features, src_mem, overrides={}):
>              ensure_has_calls(dst_radio, src_mem)
>
>      dst_mem = src_mem.dupe()
> +    # The source's immutable list almost definitely does not match the
> +    # latter, so eliminate that list here and rely on set_memory() on
> +    # the destination to enforce anything that should not be set.
> +    dst_mem.immutable = []
>
>      for k, v in overrides.items():
>          dst_mem.__dict__[k] = v
>
>
> Make sense?

Yes. I'll give it a shot.

Thanks,
Jim KC9HI



More information about the chirp_devel mailing list