PEP-8'ifying prompt_if_not_set
This commit is contained in:
parent
cfd20ed6a1
commit
bbac7663f4
@ -27,13 +27,13 @@ def setup_app(args):
|
|||||||
|
|
||||||
return mgoblin_app
|
return mgoblin_app
|
||||||
|
|
||||||
def prompt_if_not_set(variable,text,password=False):
|
def prompt_if_not_set(variable, text, password=False):
|
||||||
"""
|
"""
|
||||||
Checks if the variable is None and prompt for a value if it is
|
Checks if the variable is None and prompt for a value if it is
|
||||||
"""
|
"""
|
||||||
if (variable==None):
|
if variable is None:
|
||||||
if not password:
|
if not password:
|
||||||
variable=raw_input(text+' ')
|
variable=raw_input(text + u' ')
|
||||||
else:
|
else:
|
||||||
variable=getpass.getpass(text)
|
variable=getpass.getpass(text)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user