For Python 2.7, raw_input is needed to request input; also ensure that sample

parameters are saved once requested.
This commit is contained in:
Anthony Tuininga 2019-04-17 15:31:59 -06:00
parent 983dfdab9f
commit 763cfeae21
2 changed files with 13 additions and 0 deletions

View File

@ -43,6 +43,12 @@ import getpass
import os
import sys
# for Python 2.7 we need raw_input
try:
input = raw_input
except NameError:
pass
# default values
DEFAULT_MAIN_USER = "pythondemo"
DEFAULT_EDITION_USER = "pythoneditions"
@ -70,6 +76,7 @@ def GetValue(name, label, defaultValue=""):
value = getpass.getpass(label)
if not value:
value = defaultValue
PARAMETERS[name] = value
return value
def GetMainUser():

View File

@ -49,6 +49,12 @@ import os
import sys
import unittest
# for Python 2.7 we need raw_input
try:
input = raw_input
except NameError:
pass
# default values
DEFAULT_MAIN_USER = "pythontest"
DEFAULT_PROXY_USER = "pythontestproxy"