Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: enrich some ValueError messages

fixeria gerrit-no-reply at lists.osmocom.org
Thu Aug 29 13:27:09 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/15334


Change subject: trx_toolkit/data_msg.py: enrich some ValueError messages
......................................................................

trx_toolkit/data_msg.py: enrich some ValueError messages

Change-Id: Icdf0d136a9b820cfaec534e2604204da9ea42092
---
M src/target/trx_toolkit/data_msg.py
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/34/15334/1

diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py
index d8b21b4..9e12458 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -233,7 +233,7 @@
 	# Validates the message fields (throws ValueError)
 	def validate(self):
 		if not self.ver in self.known_versions:
-			raise ValueError("Unknown TRXD header version")
+			raise ValueError("Unknown TRXD header version %d" % self.ver)
 
 		if self.fn is None:
 			raise ValueError("TDMA frame-number is not set")
@@ -823,7 +823,7 @@
 			self.mod_type = Modulation.pick_by_bl(bl - 2)
 
 		if self.mod_type is None:
-			raise ValueError("Odd burst length")
+			raise ValueError("Odd burst length %u" % bl)
 
 		return burst[:self.mod_type.bl]
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/15334
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Icdf0d136a9b820cfaec534e2604204da9ea42092
Gerrit-Change-Number: 15334
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190829/ccf8d351/attachment.html>


More information about the gerrit-log mailing list