freeipa/ipaclient/plugins
Alexander Bokovoy 29d669fec1 otptoken: support Python 3 for the qr code
When IPA client is using Python 3, there is no str.decode() method
anymore.

ipa: ERROR: AttributeError: 'str' object has no attribute 'decode'
Traceback (most recent call last):
 File "/usr/lib/python3.5/site-packages/ipalib/cli.py", line 1345, in run
   sys.exit(api.Backend.cli.run(argv))
 File "/usr/lib/python3.5/site-packages/ipalib/cli.py", line 1110, in run
   rv = cmd.output_for_cli(self.api.Backend.textui, result, *args, **options)
 File "/usr/lib/python3.5/site-packages/ipaclient/plugins/otptoken.py", line 103, in output_for_cli
   qr = self._get_qrcode(output, uri, options['version'])
 File "/usr/lib/python3.5/site-packages/ipaclient/plugins/otptoken.py", line 61, in _get_qrcode
   qr_code = qr_output.getvalue().decode(encoding)
AttributeError: 'str' object has no attribute 'decode' ipa: ERROR: an internal error has occurred

Fixes https://fedorahosted.org/freeipa/ticket/5938

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-09 08:09:33 +02:00
..
__init__.py ipaclient: introduce ipaclient.plugins 2016-06-03 09:00:34 +02:00
automount.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
cert.py ipalib: move File command arguments to ipaclient 2016-06-03 09:00:34 +02:00
certprofile.py ipalib: move File command arguments to ipaclient 2016-06-03 09:00:34 +02:00
dns.py ipaclient: implement thin client 2016-06-03 09:00:34 +02:00
hbacrule.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
hbactest.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
host.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
idrange.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
internal.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
location.py DNS Location: location-show: return list of servers in location 2016-06-03 15:58:21 +02:00
migration.py ipalib: move File command arguments to ipaclient 2016-06-03 09:00:34 +02:00
otptoken_yubikey.py help, makeapi: specify module topic by name 2016-06-03 09:00:34 +02:00
otptoken.py otptoken: support Python 3 for the qr code 2016-06-09 08:09:33 +02:00
rpcclient.py ipalib: move client-side plugins to ipaclient 2016-06-03 09:00:34 +02:00
service.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
sudorule.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
topology.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
trust.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
user.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
vault.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00