FreeBSD Bugzilla – Attachment 214405 Details for
Bug 246414
Tools/scripts/patchtool.py: Breaks with Python 3.x due to missing raw_input
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix to make script work with both versions
patchtool.diff (text/plain), 634 bytes, created by
Ashish SHUKLA
on 2020-05-12 08:14:42 UTC
(
hide
)
Description:
Fix to make script work with both versions
Filename:
MIME Type:
Creator:
Ashish SHUKLA
Created:
2020-05-12 08:14:42 UTC
Size:
634 bytes
patch
obsolete
>Index: patchtool.py >=================================================================== >--- patchtool.py (revision 534794) >+++ patchtool.py (working copy) >@@ -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 @@ > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246414
: 214405