diff --git a/zxcvbn/__init__.py b/zxcvbn/__init__.py index 7b444a4..19a64a7 100644 --- a/zxcvbn/__init__.py +++ b/zxcvbn/__init__.py @@ -11,8 +11,8 @@ for line in fileinput.input(): pw = line.strip() - print "Password: " + pw + print("Password: " + pw) out = password_strength(pw) for key, value in out.iteritems(): if key not in ignored: - print "\t%s: %s" % (key, value) + print("\t%s: %s" % (key, value)) diff --git a/zxcvbn/matching.py b/zxcvbn/matching.py index a5b31a8..495e94b 100644 --- a/zxcvbn/matching.py +++ b/zxcvbn/matching.py @@ -63,7 +63,7 @@ def _build_ranked_dict(unranked_list): def _load_frequency_lists(): - data = pkg_resources.resource_string(__name__, 'generated/frequency_lists.json') + data = pkg_resources.resource_string(__name__, 'generated/frequency_lists.json').decode("utf-8") dicts = json.loads(data) for name, wordlist in dicts.items(): DICTIONARY_MATCHERS.append(_build_dict_matcher(name, _build_ranked_dict(wordlist))) @@ -71,7 +71,7 @@ def _load_frequency_lists(): def _load_adjacency_graphs(): global GRAPHS - data = pkg_resources.resource_string(__name__, 'generated/adjacency_graphs.json') + data = pkg_resources.resource_string(__name__, 'generated/adjacency_graphs.json').decode("utf-8") GRAPHS = json.loads(data)