From: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: dts@dpdk.org, Akihiko Odaki <akihiko.odaki@daynix.com>
Subject: [PATCH 3/7] framework/ssh_pexpect: Remove duplicate regex flags
Date: Fri, 14 Apr 2023 21:52:51 +0900 [thread overview]
Message-ID: <20230414125255.67812-4-akihiko.odaki@daynix.com> (raw)
In-Reply-To: <20230414125255.67812-1-akihiko.odaki@daynix.com>
The regex pattern "(?i)" sets global re.I flag. Not only the duplicate
regex flags are redundant, but the flags not placed at the start of the
regex makes it incompatible with Python 3.11, according to:
https://docs.python.org/3.11/library/re.html#regular-expression-syntax
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
framework/ssh_pexpect.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py
index 97406896..2132c066 100644
--- a/framework/ssh_pexpect.py
+++ b/framework/ssh_pexpect.py
@@ -50,7 +50,7 @@ class SSHPexpect:
original_prompt="[$#>]",
port=self.port,
login_timeout=20,
- password_regex=r"(?i)(?:password:)|(?:passphrase for key)|(?i)(password for .+:)",
+ password_regex=r"(?i)(?:password:)|(?:passphrase for key)|(password for .+:)",
)
except Exception as e:
print(e)
@@ -68,7 +68,7 @@ class SSHPexpect:
self.username,
self.password,
original_prompt="[$#>]",
- password_regex=r"(?i)(?:password:)|(?:passphrase for key)|(?i)(password for .+:)",
+ password_regex=r"(?i)(?:password:)|(?:passphrase for key)|(password for .+:)",
)
self.send_expect("stty -echo", "#")
self.send_expect("stty columns 1000", "#")
--
2.40.0
next prev parent reply other threads:[~2023-04-14 12:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 12:52 [PATCH 0/7] Fix for Fedora 37 Akihiko Odaki
2023-04-14 12:52 ` [PATCH 1/7] Replace Pcapy with Pcapyplus Akihiko Odaki
2023-04-14 12:52 ` [PATCH 2/7] Update numpy from 1.18.5 to 1.24.2 Akihiko Odaki
2023-04-14 12:52 ` Akihiko Odaki [this message]
2023-04-14 12:52 ` [PATCH 4/7] framework: Remove unused variable Akihiko Odaki
2023-04-14 12:52 ` [PATCH 5/7] nics/system_info: Accept memory with unknown speed Akihiko Odaki
2023-04-14 12:52 ` [PATCH 6/7] framework/packet: Fix tcpdump help parse Akihiko Odaki
2023-04-14 12:52 ` [PATCH 7/7] tests/ip_pipeline: Use common tcpdump methods Akihiko Odaki
2023-05-25 2:52 ` lijuan.tu
2023-05-06 7:27 ` [PATCH 0/7] Fix for Fedora 37 Akihiko Odaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230414125255.67812-4-akihiko.odaki@daynix.com \
--to=akihiko.odaki@daynix.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).