Tools/scripts/patchtool: adjust for Python 3

PR:		246414
Submitted by:	ashish
Event:		July 2020 Bugathon
This commit is contained in:
Rene Ladan 2020-07-11 20:26:01 +00:00
parent 837a0c9435
commit ec55b02c40
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=542048

View File

@ -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