Skip to content

fix: Adjust shell prompt patterns for PreOS environment handling#30

Open
adrianlasota wants to merge 1 commit into
mainfrom
telnet_efi
Open

fix: Adjust shell prompt patterns for PreOS environment handling#30
adrianlasota wants to merge 1 commit into
mainfrom
telnet_efi

Conversation

@adrianlasota
Copy link
Copy Markdown
Contributor

This pull request updates the logic for determining shell prompt patterns in the Telnet module to better handle the PreOS environment. The main change ensures that when in PreOS, only the explicit prompt pattern is used, avoiding issues with ANSI escape sequences.

Prompt pattern handling improvements:

  • Modified _get_shell_prompt_patterns in telnet.py to return only the provided prompt pattern (excluding ANSI fallback) when _in_pre_os() is True, ensuring correct prompt detection in PreOS environments.

Signed-off-by: Lasota, Adrian <adrian.lasota@intel.com>
Copilot AI review requested due to automatic review settings May 22, 2026 11:25
@mfd-intel-bot
Copy link
Copy Markdown
Contributor

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-connect@telnet_efi'

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adjusts Telnet shell prompt detection to better handle PreOS/UEFI environments by changing which prompt regex patterns are used when waiting for a prompt.

Changes:

  • Update _get_shell_prompt_patterns() to omit the generic ANSI-fallback prompt regex when _in_pre_os() is True.
  • Keep the existing dual-pattern behavior (explicit prompt + ANSI fallback) for non-PreOS environments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mfd_connect/telnet/telnet.py
Comment thread mfd_connect/telnet/telnet.py
@coveralls-official
Copy link
Copy Markdown

coveralls-official Bot commented May 22, 2026

Coverage Status

coverage: 78.088%. remained the same — telnet_efi into main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants