Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

improve timeout and error message for failing to match initial prompt (pexpect)

#14

When configuring a new pexpect filter, if there is a mismatch between prompt and regexp matching that prompt, pexpect will just hang.

We want this to fail quickly since the initial prompt should appear almost immediately, and problems with matches will be caught here most of the time.

Establish an INITIAL_PROMPT_TIMEOUT constant which can be set per-filter. There should not be any reason to override this per-document since the initial prompt should just be a function of the executable rather than the script being run (can add this if necessary).

Reported by Ana Nelson · February 29th, 2012 @ 02:52 PM

State: resolved
Milestone: none
Assigned to: Ana Nelson Ana Nelson

Activity

  1. Ana Nelson
    Ana Nelson
    • State changed from open to resolved

    Have implemented this. Timeout defaults to 3 seconds. Get an error message like this:

    Exception: Failed at matching initial prompt within 3 seconds. Received '>>> ', tried to match with '(#|\$)\s+'

    commit 50ca1f37581f42f25cace95ac632216a81c7667b

    February 29th, 2012 @ 03:35 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.