Update kwarg for older python

pull/11/head
Richard Harding 12 years ago
parent 0de17a7b81
commit ae355e9f2f

@ -32,6 +32,8 @@ def get_encoding(page):
# print '->', enc, "%.2f" % res['confidence']
if enc == 'MacCyrillic':
enc = 'cp1251'
if not enc:
enc = 'utf-8'
return enc

@ -37,7 +37,7 @@ def generate_hash_id(node):
content = tounicode(node)
hashed = md5()
try:
hashed.update(content.encode('utf-8', errors="replace"))
hashed.update(content.encode('utf-8', "replace"))
except Exception, e:
LOG.error("BOOM! " + str(e))

Loading…
Cancel
Save