kirr has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/40090?usp=email )
Change subject: trx_toolkit/transceiver: Use `msg is None` instead of `not msg`
......................................................................
trx_toolkit/transceiver: Use `msg is None` instead of `not msg`
`msg is None` are two pointers comparision. `not msg` goes to py-level
and can generally invoke arbitrary python code.
Change-Id: I1278bed0a83dfac13734467f5333fae30e19bd5a
---
M src/target/trx_toolkit/transceiver.pyx
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/90/40090/1
diff --git a/src/target/trx_toolkit/transceiver.pyx
b/src/target/trx_toolkit/transceiver.pyx
index 901a637..2b408a5 100644
--- a/src/target/trx_toolkit/transceiver.pyx
+++ b/src/target/trx_toolkit/transceiver.pyx
@@ -277,7 +277,7 @@
cdef TxMsg recv_data_msg(self): # -> TxMsg | None
# Read and parse data from socket
msg = self.data_if.recv_tx_msg()
- if not msg:
+ if msg is None:
return None
# Make sure that transceiver is configured and running
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/40090?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I1278bed0a83dfac13734467f5333fae30e19bd5a
Gerrit-Change-Number: 40090
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>