summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/otptoken.py
diff options
context:
space:
mode:
authorNathaniel McCallum <npmccallum@redhat.com>2014-09-10 17:35:37 -0400
committerPetr Vobornik <pvoborni@redhat.com>2014-09-11 12:48:07 +0200
commit9c50f9f957c98099ca5201b6ae742c166617e250 (patch)
treead18a997f9e9b500eb44f5b05e8d6dd40eb30356 /ipalib/plugins/otptoken.py
parent4e6a3c69b0e07e5ec32381a47281ad88e41aae5d (diff)
downloadfreeipa-9c50f9f957c98099ca5201b6ae742c166617e250.tar.gz
freeipa-9c50f9f957c98099ca5201b6ae742c166617e250.tar.xz
freeipa-9c50f9f957c98099ca5201b6ae742c166617e250.zip
Update qrcode support for newer python-qrcode
This substantially reduces the FreeIPA dependencies and allows QR codes to fit in a standard terminal. https://fedorahosted.org/freeipa/ticket/4430 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'ipalib/plugins/otptoken.py')
-rw-r--r--ipalib/plugins/otptoken.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/otptoken.py b/ipalib/plugins/otptoken.py
index dfd010e7f..1bd85d4b9 100644
--- a/ipalib/plugins/otptoken.py
+++ b/ipalib/plugins/otptoken.py
@@ -246,7 +246,7 @@ class otptoken_add(LDAPCreate):
msg_summary = _('Added OTP token "%(value)s"')
takes_options = LDAPCreate.takes_options + (
- Flag('qrcode?', label=_('Display QR code (requires wide terminal)')),
+ Flag('qrcode?', label=_('Display QR code')),
)
has_output_params = LDAPCreate.has_output_params + (
@@ -328,7 +328,7 @@ class otptoken_add(LDAPCreate):
qr = qrcode.QRCode()
qr.add_data(uri)
qr.make()
- qr.print_tty()
+ qr.print_ascii(tty=True)
print "\n"
return rv