mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
unicode fix in python2
This commit is contained in:
parent
1d30e94480
commit
eccc6b3201
2 changed files with 7 additions and 0 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue