#14 ✓resolved
Ana Nelson

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

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

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).

Comments and changes to this ticket

  • Ana Nelson

    Ana Nelson February 29th, 2012 @ 03:35 PM

    • 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

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages