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
2
attachment: 0001-fixed-exception-raising-that-occurs-when-too-much-da.patch
(1.1 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From b95f2046901356096c2b04ad78e8dfcbaca40156 Mon Sep 17 00:00:00 2001
From: Christoph Siedentop <christophsiedentop+git@gmail.com>
Date: Thu, 12 May 2011 23:06:49 +0100
Subject: [PATCH] fixed exception raising that occurs when too much data is being tried to encoded.
---
PyQRNative.py | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/PyQRNative.py b/PyQRNative.py
index 2d3dd48..9bcaf8d 100644
--- a/PyQRNative.py
+++ b/PyQRNative.py
@@ -277,12 +277,8 @@ class QRCode:
totalDataCount += rsBlocks[i].dataCount
if (buffer.getLengthInBits() > totalDataCount * 8):
- raise Exception("code length overflow. ("
- + buffer.getLengthInBits()
- + ">"
- + totalDataCount * 8
- + ")")
-
+ raise Exception("code length overflow. Data size (%s) > Size available (%d))" %(buffer.getLengthInBits(), totalDataCount * 8))
+
#// end code
if (buffer.getLengthInBits() + 4 <= totalDataCount * 8):
buffer.put(0, 4)
--
1.7.1
Powered by
Google Project Hosting