If you try to parse strings that don't follow the expected "colon-separated pair on every non-empty line" format with vyos.util.colon_separated_to_dict(), you get a non-informative unassigned variable error that doesn't provide any insight into the cause or debugging hints.
>>> import vyos.util >>> vyos.util.colon_separated_to_dict("no colon in this line, lmao") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/vyos/util.py", line 334, in colon_separated_to_dict if key in data.keys(): UnboundLocalError: local variable 'key' referenced before assignment
I believe such errors should explain what happened and show the offending line.