Skip to content

Commit eebc2c5

Browse files
author
Jesus Zen Droïd
committed
meeh. doing label a bit more "right"
1 parent 2cfaad4 commit eebc2c5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

barcode/codex.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ class MSI(Barcode):
284284
:param encoding: string
285285
if set, convert bytes to string and use this as a label. defaults to utf-8
286286
if unset, use integer value as label
287-
Note: label can also be set when calling save() with param 'text'
287+
Note: for convenience ; label can also be set when calling save() with param
288+
'text'
288289
289290
limitations:
290291
- only one check digit (Luhn Mod10)
@@ -309,7 +310,7 @@ def __init__(
309310
elif type(code) is bytes:
310311
self.code = str(int.from_bytes(code, byteorder))
311312
if encoding is not None:
312-
self.label = code.decode(encoding) if label is None else label
313+
self.label = code.decode(encoding)
313314
else:
314315
self.label = self.code if label is None else label
315316

0 commit comments

Comments
 (0)