From: Tony Mack Date: Tue, 17 Jul 2012 16:30:46 +0000 (-0400) Subject: dont forget to return after setting value in prompt_variable X-Git-Tag: sfa-2.1-14~106 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=00fdc14dca78029a0f0e5bd82bddaf69261c6948 dont forget to return after setting value in prompt_variable --- diff --git a/config/sfa-config-tty b/config/sfa-config-tty index 5ec73d88..d90a4521 100755 --- a/config/sfa-config-tty +++ b/config/sfa-config-tty @@ -258,6 +258,7 @@ def prompt_variable (cdef, cread, cwrite, category, variable, else: if cdef.validate_type(variable_type, answer): cwrite.set(category_id, variable_id, answer) + return else: print "Not a valid value" @@ -335,7 +336,7 @@ def mainloop (cdef, cread, cwrite, default_config, site_config, consolidated_con global service while True: try: - answer = raw_input("Enter command (u for usual changes, w to save, ? for help) ").strip(" ") + answer = raw_input("Enter command (u for usual changes, w to save, ? for help) ").strip() except EOFError: answer ="" except KeyboardInterrupt: