# enabling this will cause the node to ask for breakpoint-mode at startup
# production code should read False/False
# enabling this will cause the node to ask for breakpoint-mode at startup
# production code should read False/False
sys.stdout.flush()
r,w,e = select.select ([sys.stdin],[],[],PROMPT_TIMEOUT)
if r:
answer = string.strip(sys.stdin.readline())
else:
sys.stdout.flush()
r,w,e = select.select ([sys.stdin],[],[],PROMPT_TIMEOUT)
if r:
answer = string.strip(sys.stdin.readline())
else:
- sys.stdout.write("Timed-out is %ds\n"%PROMPT_TIMEOUT)
- BREAKPOINT_MODE = ( answer == "y" or answer == "Y")
+ sys.stdout.write("\nTimed-out (%d s)"%PROMPT_TIMEOUT)
+ if answer:
+ BREAKPOINT_MODE = ( answer == "y" or answer == "Y")
+ else:
+ BREAKPOINT_MODE = default_answer