| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Fixes for bug WhyNotHugo#55 writer_options{"add_checksum": False} being ignored for Code39 barcodes. Added class variable to track when the checksum has been added so it can't add twice Moved the check for checksum to the render function Set a default value class variable.
There was a problem hiding this comment.
Seems to make sense to me -- tho I can't see how the checksum got calculated twice. Have you figured out where that happened?
Sorry, something went wrong.
|
|
||
| def calculate_checksum(self): | ||
| check = sum(code39.MAP[x][0] for x in self.code) % 43 | ||
| check = sum([code39.MAP[x][0] for x in self.code]) % 43 |
There was a problem hiding this comment.
List comprehension seems redundant here.
Sorry, something went wrong.
There was a problem hiding this comment.
Completely agree, not sure how that line got changed.
Sorry, something went wrong.
There was a problem hiding this comment.
No I didn't see an example of it being added twice, but if anyone called the render function twice then it would.
Agreed on list comprehension
Sorry, something went wrong.
|
render doesn't seem to modify self.code. How does the checksum end up being added twice? It would seem that it's only done in the constructor (or am I missing something?). |
Sorry, something went wrong.
This was changed in the first commit. I moved the checksum code from the class constructor to the render function. The second commit was just to address your previous comments. If you look at the combined changes you can see the new render code. |
Sorry, something went wrong.
|
Sorry, I'm not seeing it. 😓 |
Sorry, something went wrong.
|
I think perhaps I have not explained the change very well. I am traveling at the moment, but will take some time and fully document the bug, the fix, what code breaks etc. Thanks for your patience. |
Sorry, something went wrong.
|
Hey there! Do you have any update? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes for bug #55
writer_options{"add_checksum": False} being ignored for Code39 barcodes.
Added class variable to track when the checksum has been added so it can't add twice
Moved the check for checksum to the render function
Set a default value class variable.