lucc / khard

Console vcard client
https://khard.readthedocs.io/en/latest/
GNU General Public License v3.0
595 stars 66 forks source link

Fix yaml conversion of post addresses #324

Closed lucc closed 1 year ago

lucc commented 1 year ago

This fixes #323.

lucc commented 1 year ago

@lemmerk can you confirm that this fixes your issue?

@skowalak do you know why you only returned the first address with 9ab66ac? It looks the original code handles lists of addresses under one label:

https://github.com/lucc/khard/commit/9ab66ac0dab45da8665afa2033950946162f299d#diff-a189618efcc4fcc11fb726bee1742df072e671aace70782e53e4b2b8c1074f70L1316-L1320

But the new code only picks the first list:

https://github.com/lucc/khard/commit/9ab66ac0dab45da8665afa2033950946162f299d#diff-66dd891e1f121132ebda2ced9353326dc336e5a396c6f95511a4487d6df5f61cR124-R125

I could not find any discussion about this in #302 even though I made an unrelated comment about this piece of code https://github.com/lucc/khard/pull/302#discussion_r815494364 I must have missed this issue back then.

lemmerk commented 1 year ago

not sure how to check. followed the instructions in the dev section (i think) but it wouldn't run due to a missing version.py.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/lemmerk/sandbox/khard/khard/__main__.py", line 3, in <module>
    from .khard import main
  File "/home/lemmerk/sandbox/khard/khard/khard.py", line 21, in <module>
    from . import cli
  File "/home/lemmerk/sandbox/khard/khard/cli.py", line 12, in <module>
    from .version import version as khard_version
ModuleNotFoundError: No module named 'khard.version'
skowalak commented 1 year ago

@lucc You are right, my code apparently only picks the first address in the list. I cannot remember why this was introduced by me, thank you for fixing it!

lucc commented 1 year ago

@lemmerk I suggest you enter a venv and then install with pip. I have to rewrite these notes some time but currently I am using nix flakes.