shaneramey/vault-backup

Encoding issue

Opened this issue · 2 comments

Hello
First thank you very much for this useful script.
Then I would like to rise a question. I got an error trying to encode £ symbol

Traceback (most recent call last):
File "vault-dump.py", line 63, in
recurse_for_values(top_vault_prefix, top_level_keys)
File "vault-dump.py", line 49, in recurse_for_values
print " {0}='{1}' \".format(final_key, final_value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 7: ordinal not in range(128)

So I guess it is because the symbol can not be encoded in 128 bit
And I suppose there will be many such symbols so I want to ask if it is possible to have a file with secrets to be excluded from the dump as it will solve issues like this?

#2 should explain in README.md how to avid this issue.

Thanks for the report and the fix!. I'll close this issue.