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:
parent
f324757909
commit
8681366f53
@ -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():
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user