My favorites
▼
|
Sign in
pyqrnative
Native Python QR code generation library
Project Home
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
3
attachment: PyQRNative.py.patch
(815 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- trunk/pyqrnative/src/PyQRNative.py
+++ trunk/pyqrnative/src/PyQRNative.py
@@ -19,6 +19,8 @@
# DENSO WAVE INCORPORATED
# http://www.denso-wave.com/qrcode/faqpatent-e.html
+class CodeOverflowSelection(Exception):
+ pass
class QR8bitByte:
@@ -277,11 +279,7 @@
totalDataCount += rsBlocks[i].dataCount
if (buffer.getLengthInBits() > totalDataCount * 8):
- raise Exception("code length overflow. ("
- + buffer.getLengthInBits()
- + ">"
- + totalDataCount * 8
- + ")")
+ raise CodeOverflowException("Code length overflow (%s > %s)." % (buffer.getLengthInBits(), totalDataCount * 8))
#// end code
if (buffer.getLengthInBits() + 4 <= totalDataCount * 8):
Powered by
Google Project Hosting