mirror of https://gerrit.osmocom.org/pysim
Fix printing of SwMatchError after introduction of logical channels
the interpret_sw() method was moved from RuntimeState to RuntimeLchan in Change-Id I7aa994b625467d4e46a2edd8123240b930305360 - but the code in pySim/exceptions.py was not adjusted accordingly. Change-Id: I0614436c99c6a6ebc22c4dc14fb361c5f5f16686
This commit is contained in:
parent
93c34aac89
commit
7416d463a4
|
@ -53,8 +53,8 @@ class SwMatchError(Exception):
|
||||||
self.rs = rs
|
self.rs = rs
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
if self.rs:
|
if self.rs and self.rs.lchan[0]:
|
||||||
r = self.rs.interpret_sw(self.sw_actual)
|
r = self.rs.lchan[0].interpret_sw(self.sw_actual)
|
||||||
if r:
|
if r:
|
||||||
return "SW match failed! Expected %s and got %s: %s - %s" % (self.sw_expected, self.sw_actual, r[0], r[1])
|
return "SW match failed! Expected %s and got %s: %s - %s" % (self.sw_expected, self.sw_actual, r[0], r[1])
|
||||||
return "SW match failed! Expected %s and got %s." % (self.sw_expected, self.sw_actual)
|
return "SW match failed! Expected %s and got %s." % (self.sw_expected, self.sw_actual)
|
||||||
|
|
Loading…
Reference in New Issue