Commit 0bd796a
Fix issue #171 calculating checksum before any controls
Moved `super().__init__` before calling `_calculate_checksum()` to check if the string contains any letters to prevent value errors that can happen when calculating checksum. I tested the new version with the input `0132354187` and the produced barcode before and after the commit is the same as `9780132352`.1 parent 7dd1609 commit 0bd796a
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments