From 703c2c0895295bfc50ce6d9f7b155660c8f6ff36 Mon Sep 17 00:00:00 2001 From: ecdsa Date: Sun, 3 Mar 2013 19:20:24 +0100 Subject: [PATCH] qr codes: handle exception raised if the string is too long --- gui/qrcodewidget.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/qrcodewidget.py b/gui/qrcodewidget.py index 8f964b0c1..048b73497 100644 --- a/gui/qrcodewidget.py +++ b/gui/qrcodewidget.py @@ -28,7 +28,10 @@ class QRCodeWidget(QWidget): if self.addr and not self.qr: self.qr = pyqrnative.QRCode(self.size, pyqrnative.QRErrorCorrectLevel.L) self.qr.addData(self.addr) - self.qr.make() + try: + self.qr.make() + except: + self.qr=None self.update() def paintEvent(self, e):