From: buliabyak Date: Tue, 6 Jan 2009 16:13:13 +0000 (+0000) Subject: patch 276351, fix warning X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f6b2755fe2c74bfc80b2e5f4c833b2b4f2b36d85;p=inkscape.git patch 276351, fix warning --- 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")