lucc / khard

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

Empty entry for "private_objects" in config causes error #235

Closed salexan2001 closed 4 years ago

salexan2001 commented 4 years ago

After upgrading khard from 0.14.0 to 0.15.1 I am receiving the following error message:

ERROR:root:Error in config file, vcard.private_objects: the value "" is of the wrong type.

The corresponding key in the config file is empty and reads:

[vcard]
# extend contacts with your own private objects
# these objects are stored with a leading "X-" before the object name in the vcard files
# every object label may only contain letters, digits and the - character
# example:
#   private_objects = Jabber, Skype, Twitter
private_objects = 
lucc commented 4 years ago

private_objects should be a list of strings. configobj interprets what you write as the empty string. According to the docs an empty list can be achived with private_objects = ,.

I could hack a special case for the empty string into the validator but am not sure. You could also just remove the line from your config as the default is the empty list.

lucc commented 4 years ago

The configobj docs for the syntax were already linked from the man page. I now added the link also to the example config file. With that I consider it documented well enough.

Sorry that the last update broke it for you but I do not want to code an extra case just for empty values at that point in the config. Please edit your config file.

salexan2001 commented 4 years ago

Yes, this solution is absolutely fine. Thank you!