Code

patch 276351, fix warning
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 6 Jan 2009 16:13:13 +0000 (16:13 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 6 Jan 2009 16:13:13 +0000 (16:13 +0000)
share/extensions/Barcode/EAN13.py
share/extensions/render_barcode.py

index c1d728695325ec6680a8ddbedc8a5fa5171add88..3450893fc19cf5a25b2809f81f21d8bc6fc456b3 100644 (file)
@@ -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
 
index 77cb3135b5ea40a8e6268cd34de665b40a6ca4c5..cdcb022cb5312314dcef7cb8dbe658dde787139c 100644 (file)
@@ -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")