diff options
Diffstat (limited to 'Tools/scripts/patchtool.py')
-rwxr-xr-x | Tools/scripts/patchtool.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/scripts/patchtool.py b/Tools/scripts/patchtool.py index c58d68e67dc2..201b64bfbb96 100755 --- a/Tools/scripts/patchtool.py +++ b/Tools/scripts/patchtool.py @@ -22,6 +22,11 @@ import os, os.path, subprocess, sys, getopt, glob, errno, types +# python3 lacks raw_input +compat_raw_input = input +if sys.version_info < (3,): + compat_raw_input = raw_input + # Some global variables used as constants #True = 1 #False = 0 @@ -264,7 +269,7 @@ def query_yn(message, default = False): else: yn = 'Y/N' - reply = raw_input('%s [%s]: ' % (message, yn)) + reply = compat_raw_input('%s [%s]: ' % (message, yn)) if reply == 'y' or reply == 'Y': return True |