From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1328042942; Fri, 14 Apr 2023 14:53:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F60342BB1; Fri, 14 Apr 2023 14:53:16 +0200 (CEST) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 8A3F0400D5 for ; Fri, 14 Apr 2023 14:53:14 +0200 (CEST) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-246fa478d45so575618a91.3 for ; Fri, 14 Apr 2023 05:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20221208.gappssmtp.com; s=20221208; t=1681476793; x=1684068793; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nsb/q294Mamfqv+eUA0p1PMxc7C8mQsu5c85G0MyIJA=; b=fCvBNfoPVuJ2cEqcJWFV98GG96seNATPLW1pP/Ds2dluxqQPBP/LuuGHY3itg6itYO 2b7eAB3XhL7T+VXJdM+vDRhNZx0oMTR4gRhHvH/lRvqo07bEce5ll0tiGjs8l2IhZLeq 3h/3PEdOCOf8TlgGjdfTRK6KC7mI4NTEWlNZ48Hy4qONe0wcwxoHCt46iSeXZABrCYh8 Bffzzgz2kBZPFcK4tDLMhdX+/6CLhjO+ATY3csi2qWgu8AbO76Iix4FUqxri670lcedy ELaXvh5w3m0onfz1ecfor/6EjVyuL3QS0/8KKRaAMxfMVJctPiQO7kogrrlhb27X65H4 gvwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681476793; x=1684068793; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nsb/q294Mamfqv+eUA0p1PMxc7C8mQsu5c85G0MyIJA=; b=FnjDBP+UoefTs0iZ6DZ8ADJuaaAu7uoPgTIjuXcXlzBp8+MzAZ7LnC/05p5NY0iIlN 7utOZS2/R9JnhTOb0aCMz0eY20HoIEaMA4iNItOv8X3k5tM7VVlWp7imE7hn7obVE1XJ QCNaxsWa1mTQ/GM32mlDHjn5yIjjsDqQyS3tH6Q6lJLRim7Q4lLyz93UXy3Ipc8Ji5Fj DZ43MLNPLoDsP6zu446NT04VyfzCibk8t0lDl8tFcWMF+QEOE82+QmxnETahnA3TSDW/ 9LbOWMFrnNG55Ue6oZBPuBZU7LSEZ0Ou0O3teZX4IBGcJlGYNkr7jbpSUOYWBhEcQEZU oPiQ== X-Gm-Message-State: AAQBX9d2+bkoiutdvX8BtPNVshX0bDyUyKTm8xroEfBzVUe/yTk+YGGI FKvE3qqp0i7iY0o7MRSEg4rKSw/TtyLWAmG3VIc= X-Google-Smtp-Source: AKy350Yjbz5U304lQ2wQdmgeKiDMK5jGD0AQ0w7FtD4KuE9A2bCdZqWPV/58Ufzb2suLmrgrnOqLKg== X-Received: by 2002:a05:6a00:2449:b0:628:1b3:d499 with SMTP id d9-20020a056a00244900b0062801b3d499mr7931321pfj.21.1681476793692; Fri, 14 Apr 2023 05:53:13 -0700 (PDT) Received: from alarm.flets-east.jp ([2400:4050:a840:1e00:4457:c267:5e09:481b]) by smtp.gmail.com with ESMTPSA id u21-20020a62ed15000000b00627df85cd72sm2961787pfh.199.2023.04.14.05.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 05:53:13 -0700 (PDT) From: Akihiko Odaki To: Cc: dts@dpdk.org, Akihiko Odaki Subject: [PATCH 3/7] framework/ssh_pexpect: Remove duplicate regex flags Date: Fri, 14 Apr 2023 21:52:51 +0900 Message-Id: <20230414125255.67812-4-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230414125255.67812-1-akihiko.odaki@daynix.com> References: <20230414125255.67812-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org 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 --- 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