Closed dwcoder closed 8 years ago
Hey @dwcoder , yes, that's a shortcoming of standard libs ConfigParser
/ configparser
I guess.
Generally, I would not oppose to strip quote symbols from string values. There will hardly be many users with literally "something-so-weird"
as delimiter.
We should, however, take care to support stripping both, "
as well as '
.
That would make a nice little improvement with low user impact.
@dwcoder, I took the liberty to rename the issue. Mentioning spaces might describe more concise what the problem is. I hope you do not mind!
@ulif yeah, good idea with renaming the issue.
I will add the stripping function (and unit tests) and submit a pull request when I am done.
@dwcoder great, thanks a lot!
This isn't really a bug, but I want to mention it anyway, just to make sure.
If my diceware.ini file contains the following:
an example output from the
diceware -n 2
command is as follows:That is, the delimiter is being read literally as
" "
from the .ini file. Thus, there is no way (that I am aware of) to set space as your default delimiter using the ini file.One way to fix this (if it is indeed an issue) is to add a
strip('"')
to line 85 in theconfig.py
file in theget_config_dict
function, as mentioned in this answer. That will strip out all instances of"
from the ini file. This may or may not be a good thing.