laforge has submitted this change. ( https://gerrit.osmocom.org/c/python/osmo-python-tests/+/32063 )
Change subject: InteractVty: re.escape() the VTY prompt in connect()
......................................................................
InteractVty: re.escape() the VTY prompt in connect()
The VTY prompt may contain regular expression metacharacters in it,
so the self.re_prompt will not match as expected. One example is
the modem app in osmocom-bb.git using promot 'OsmocomBB(modem)'.
Change-Id: I47b1f1c1765acb1b935dcbcc54bbb5eb539db4f0
---
M osmopy/osmo_interact/vty.py
1 file changed, 14 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
laforge: Looks good to me, approved
diff --git a/osmopy/osmo_interact/vty.py b/osmopy/osmo_interact/vty.py
index f4b9aff..1cc299c 100755
--- a/osmopy/osmo_interact/vty.py
+++ b/osmopy/osmo_interact/vty.py
@@ -95,7 +95,7 @@
if not self.prompt:
raise Exception('Could not find application name; needed to decode prompts.'
' Initial data was: %r' % data)
- self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % self.prompt)
+ self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % re.escape(self.prompt))
def _command(self, command_str, timeout=10):
self.socket.send(command_str.encode())
--
To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/32063
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: I47b1f1c1765acb1b935dcbcc54bbb5eb539db4f0
Gerrit-Change-Number: 32063
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/32069 )
Change subject: 3G: decapsulate IuUP to AMR at the MGW; allow 3G<-AMR->2G
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/32069
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I386a6a426c318040b019ab5541689c67e94672a1
Gerrit-Change-Number: 32069
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Mar 2023 08:43:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment