From eccc6b3201fb7705066eafe24ded433e0813ea29 Mon Sep 17 00:00:00 2001 From: ttgump Date: Thu, 8 Aug 2013 16:24:03 -0400 Subject: [PATCH] unicode fix in python2 --- tuf/repo/signercli.py | 4 ++++ tuf/tests/system_tests/test_endless_data_attack.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/tuf/repo/signercli.py b/tuf/repo/signercli.py index d3d7b1d9..a4c76f86 100755 --- a/tuf/repo/signercli.py +++ b/tuf/repo/signercli.py @@ -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)) diff --git a/tuf/tests/system_tests/test_endless_data_attack.py b/tuf/tests/system_tests/test_endless_data_attack.py index 0530f128..99dbd6dd 100755 --- a/tuf/tests/system_tests/test_endless_data_attack.py +++ b/tuf/tests/system_tests/test_endless_data_attack.py @@ -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):