Squash of @alapolloni 's PR

Fixes #100 and #102
This commit is contained in:
Manuel Ebert 2013-11-22 12:27:52 -08:00
parent fb629266e6
commit de6f4b2823

View file

@ -57,7 +57,7 @@ def set_keychain(journal_name, password):
def u(s):
"""Mock unicode function for python 2 and 3 compatibility."""
return s if PY3 or type(s) is unicode else unicode(s, "unicode_escape")
return s if PY3 or type(s) is unicode else unicode(s.encode('string-escape'), "unicode_escape")
def prompt(msg):
"""Prints a message to the std err stream defined in util."""