<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">Did you actually experience this happening or are you just being defensive since it’s technically possible?</span></blockquote><div><br></div><div>Yeah, I did. I'm not 100% I can repro it now.</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 19, 2017 at 6:58 AM, Dan Smith <span dir="ltr"><<a href="mailto:dsmith@danplanet.com" target="_blank">dsmith@danplanet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> # HG changeset patch<br>
> # User Christopher Hoover <<a href="mailto:ch@murgatroid.com">ch@murgatroid.com</a>><br>
> # Date 1510451669 28800<br>
> # Sat Nov 11 17:54:29 2017 -0800<br>
> # Node ID daba4a5f7acefe52f5fa4f036c9df5<wbr>9865c8df1e<br>
> # Parent 0e0470d3e892bfd4818bfb972b8b85<wbr>d58f2b00d4<br>
> Fixes case where column order setting parsing was calling split on None.<br>
<br>
</span>Same for this one.<br>
<span class=""><br>
><br>
> diff -r 0e0470d3e892 -r daba4a5f7ace chirp/ui/memedit.py<br>
> --- a/chirp/ui/memedit.py Fri Nov 03 20:24:29 2017 -0400<br>
> +++ b/chirp/ui/memedit.py Sat Nov 11 17:54:29 2017 -0800<br>
> @@ -961,15 +961,19 @@<br>
><br>
> default_col_order = [x for x, y, z in self.cols if z]<br>
> try:<br>
> - col_order = self._config.get("column_<wbr>order_%s" %<br>
> - self.__class__.__name__).<wbr>split(",")<br>
> - if len(col_order) != len(default_col_order):<br>
> - raise Exception()<br>
> - for i in col_order:<br>
> - if i not in default_col_order:<br>
> + config_setting = self._config.get("column_<wbr>order_%s" %<br>
> + self.__class__.__name__)<br>
> + if config_setting is None:<br>
<br>
</span>Did you actually experience this happening or are you just being defensive since it’s technically possible?<br>
<span class=""><br>
> + col_order = default_col_order<br>
> + else:<br>
> + col_order = config_setting.split(",")<br>
> + if len(col_order) != len(default_col_order):<br>
> raise Exception()<br>
> + for i in col_order:<br>
> + if i not in default_col_order:<br>
> + raise Exception()<br>
<br>
<br>
</span>One other way to do this would be to just make it:<br>
<br>
for i in col_order or default_col_order:<br>
<br>
Thus avoiding the extra conditional and indent. But, that’s just a nit.<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
—Dan</font></span></blockquote></div><br></div>