Skip to content

Commit

Permalink
fix 'fake_isbn' encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
xlcnd committed Jan 20, 2015
1 parent a15b403 commit d6b8fcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions isbnlib/dev/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
import sys

from .bouth23 import b2u3
from .bouth23 import b2u3, b

WINDOWS = os.name == 'nt'

Expand All @@ -32,7 +32,7 @@ def fake_isbn(title, sid=1):
regex2 = re.compile(r'\s\s+', re.I | re.M | re.S)
title = regex2.sub(' ', title).strip().lower()
#hash
return int(hashlib.md5(title).hexdigest()[:10], 16) + sid * 1000000000000
return int(hashlib.md5(b(title)).hexdigest()[:10], 16) + sid * 1000000000000


def in_virtual(): # pragma: no cover
Expand Down

0 comments on commit d6b8fcc

Please sign in to comment.