From f6b2755fe2c74bfc80b2e5f4c833b2b4f2b36d85 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Tue, 6 Jan 2009 16:13:13 +0000 Subject: [PATCH] patch 276351, fix warning --- share/extensions/Barcode/EAN13.py | 2 +- share/extensions/render_barcode.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/extensions/Barcode/EAN13.py b/share/extensions/Barcode/EAN13.py index c1d728695..3450893fc 100644 --- a/share/extensions/Barcode/EAN13.py +++ b/share/extensions/Barcode/EAN13.py @@ -84,7 +84,7 @@ class Object(Barcode): return str(z) def varifyChecksum(self, number): - new = self.computeChecksum(number[:12]) + new = self.getChecksum(number[:12]) existing = number[12] return new == existing diff --git a/share/extensions/render_barcode.py b/share/extensions/render_barcode.py index 77cb3135b..cdcb022cb 100644 --- a/share/extensions/render_barcode.py +++ b/share/extensions/render_barcode.py @@ -45,9 +45,9 @@ class InsertBarcode(inkex.Effect): 'x' : x, 'y' : y, } ) - if object: + if object is not None: barcode = object.generate() - if barcode: + if barcode is not None: self.current_layer.append(barcode) else: sys.stderr.write("No barcode was generated\n") -- 2.30.2