summaryrefslogtreecommitdiffstats
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
commit0f200143db67a3f56f1c15951e173a805a1b9ab1 (patch)
tree0af45c88829dc74b0d55b6d01d269ed55a388b8e
parent52cf28aae6b51eadb0bf596f9a306647c750632f (diff)
downloadfreeipa-0f200143db67a3f56f1c15951e173a805a1b9ab1.tar.gz
freeipa-0f200143db67a3f56f1c15951e173a805a1b9ab1.tar.xz
freeipa-0f200143db67a3f56f1c15951e173a805a1b9ab1.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>
-rw-r--r--freeipa.spec.in4
-rw-r--r--ipalib/plugins/otptoken.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in
index 0e43ee755..f1c8a057f 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -59,7 +59,7 @@ BuildRequires: python-memcached
BuildRequires: sssd >= 1.9.2
BuildRequires: python-lxml
BuildRequires: python-pyasn1 >= 0.0.9a
-BuildRequires: python-qrcode
+BuildRequires: python-qrcode-core >= 5.0.0
BuildRequires: python-dns
BuildRequires: m2crypto
BuildRequires: check
@@ -248,7 +248,7 @@ Requires: python-nss >= 0.15
Requires: python-lxml
Requires: python-netaddr
Requires: libipa_hbac-python
-Requires: python-qrcode
+Requires: python-qrcode-core >= 5.0.0
Requires: python-pyasn1
Requires: python-dateutil
Requires: python-yubico
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