jleclanche / python-bna

Python implementation of the mobile Blizzard Authenticator (TOTP)
https://eu.battle.net/support/en/article/24520
MIT License
255 stars 38 forks source link

Restore command crashed with TypeError #17

Closed cpaucar3 closed 5 years ago

cpaucar3 commented 5 years ago

Using latest commit 1e95483, see below:

chris@virtualBoxUbuntu:\~/python-bna$ echo $PYTHONPATH /home/chris/.local/lib/python3.7/site-packages: chris@virtualBoxUbuntu:\~/python-bna$ python3.7 --version Python 3.7.1 chris@virtualBoxUbuntu:~/python-bna$ python3.7 ./bin/bna restore AA-1111-2222-3333 ABCDEFGHIJ Traceback (most recent call last): File "./bin/bna", line 281, in main() File "/home/chris/.local/lib/python3.7/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/home/chris/.local/lib/python3.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/chris/.local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/chris/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/chris/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(args, *kwargs) File "/home/chris/.local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), args, **kwargs) File "./bin/bna", line 229, in restore ctx.obj.add_serial(serial, secret, set_default=set_default) File "./bin/bna", line 89, in add_serial self.set_secret(serial, secret) File "./bin/bna", line 136, in set_secret self.config.set(serial, "secret", secret) File "/usr/lib/python3.7/configparser.py", line 1197, in set self._validate_value_types(option=option, value=value) File "/usr/lib/python3.7/configparser.py", line 1182, in _validate_value_types raise TypeError("option values must be strings") TypeError: option values must be strings

jleclanche commented 5 years ago

Fixed duplicate of #18.