Skip to content

Commit 486028c

Browse files
d-r-jenkinsWhyNotHugo
authored andcommitted
Update isxn.py to account for ISBN standard changes.
As discussed here https://www.isbn-international.org/content/changes-united-states-isbn-prefixes the valid ISBN range is being extended to include ISBN-979-8
1 parent 0fab6ae commit 486028c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

barcode/isxn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, isbn, writer=None):
4545
self.isbn13 = isbn
4646
if isbn[:3] not in ("978", "979"):
4747
raise WrongCountryCodeError("ISBN must start with 978 or 979.")
48-
if isbn[:3] == "979" and isbn[3:5] not in ("10", "11"):
48+
if isbn[:3] == "979" and isbn[3:4] not in ("1", "8"):
4949
raise BarcodeError("ISBN must start with 97910 or 97911.")
5050
super().__init__(isbn, writer)
5151

0 commit comments

Comments
 (0)