Change in osmo-gsm-tester[master]: rfemu_amarisoft: handle exception and log event if WS is closed

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

srs_andre gerrit-no-reply at lists.osmocom.org
Fri Aug 28 08:58:03 UTC 2020


srs_andre has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/19859 )


Change subject: rfemu_amarisoft: handle exception and log event if WS is closed
......................................................................

rfemu_amarisoft: handle exception and log event if WS is closed

the WS is closed if the eNB process dies. this patch will log an
event but not stop the experiment.

Change-Id: I0fafc7e38954400540375d51813e96500700f50c
---
M src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
1 file changed, 9 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/59/19859/1

diff --git a/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py b/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
index 17aa43a..585166a 100644
--- a/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
+++ b/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
@@ -53,11 +53,15 @@
     def set_attenuation(self, db):
         msg = { "message": "cell_gain", "cell_id": int(self.cell_id), "gain": -db }
         msg_str = json.dumps(msg)
-        self.dbg('sending CTRL msg: "%s"' % msg_str)
-        self.ws.send(msg_str)
-        self.dbg('waiting CTRL recv...')
-        result = self.ws.recv()
-        self.dbg('Received CTRL msg: "%s"' % result)
+        try:
+            self.dbg('sending CTRL msg: "%s"' % msg_str)
+            self.ws.send(msg_str)
+            self.dbg('waiting CTRL recv...')
+            result = self.ws.recv()
+            self.dbg('Received CTRL msg: "%s"' % result)
+        except Exception:
+            log.Error('Error sending CTLR msg to eNB. eNB still running?')
+            pass
 
     def get_max_attenuation(self):
         return 200 # maximum cell_gain value in Amarisoft

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/19859
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I0fafc7e38954400540375d51813e96500700f50c
Gerrit-Change-Number: 19859
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200828/86012fd1/attachment.htm>


More information about the gerrit-log mailing list