unicode fix in python2

This commit is contained in:
ttgump 2013-08-08 16:24:03 -04:00
parent 1d30e94480
commit eccc6b3201
2 changed files with 7 additions and 0 deletions

View file

@ -116,6 +116,10 @@ def _prompt(message, result_type=str):
caller.
"""
# we need to use unicode in python 2
python_version = sys.version_info[0]
if python_version==2:
str = unicode
return result_type(raw_input(message))

View file

@ -42,11 +42,14 @@
import tuf
from tuf.interposition import urllib_tuf
import logging
# Disable logging.
util_test_tools.disable_logging()
logger = logging.getLogger('tuf')
class EndlessDataAttack(Exception):