Skip to content

Commit

Permalink
Implement change as suggested in #58.
Browse files Browse the repository at this point in the history
Fixes #58.
  • Loading branch information
Michael Howitz committed May 8, 2019
1 parent 9adbf1c commit 76b2fb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Products/ZCTextIndex/WidCode.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
# 1abcdefg 0hijkLmn 0opqrstu 0vwxyzAB

import re
import six


def encode(wids):
Expand Down Expand Up @@ -87,7 +88,7 @@ def _encode(w):

def decode(code):
# Handle bytes that were not properly decoded during Python 3 conversion
if not isinstance(code, str):
if six.PY3 and isinstance(code, six.binary_type)
code = code.decode('latin1')
# Decode a string into a list of wids.
get = _decoding.get
Expand Down

0 comments on commit 76b2fb3

Please sign in to comment.