From 993e5a554e17e89c061fef9ab2a16d8071817d7b Mon Sep 17 00:00:00 2001 From: James Benton Date: Thu, 17 Jan 2019 23:14:36 +0000 Subject: [PATCH] Fix conanfile for python3 --- conanfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 0b512d3a..a10cdc79 100644 --- a/conanfile.py +++ b/conanfile.py @@ -23,9 +23,13 @@ def query_yes_no(question, default="yes"): else: raise ValueError("invalid default answer: '%s'" % default) + global input + try: input = raw_input + except NameError: pass + while True: sys.stdout.write(question + prompt) - choice = raw_input().lower() + choice = input().lower() if default is not None and choice == '': return valid[default] elif choice in valid: