forked from public/pysim
ts_51_011: fix EF_ServiceTable: use self for static method
Even though _bit_byte_offset_for_service() is a @staticmethod, it's still available via self, just like any non-static method. Change-Id: I3590dda341d534deb1b7f4743ea31ab16dbd6912
This commit is contained in:
@@ -670,16 +670,14 @@ class EF_ServiceTable(TransparentEF):
|
|||||||
bin_len = 0
|
bin_len = 0
|
||||||
for srv in in_json.keys():
|
for srv in in_json.keys():
|
||||||
service_nr = int(srv)
|
service_nr = int(srv)
|
||||||
(byte_offset, bit_offset) = EF_ServiceTable._bit_byte_offset_for_service(
|
(byte_offset, bit_offset) = self._bit_byte_offset_for_service(service_nr)
|
||||||
service_nr)
|
|
||||||
if byte_offset >= bin_len:
|
if byte_offset >= bin_len:
|
||||||
bin_len = byte_offset+1
|
bin_len = byte_offset+1
|
||||||
# encode the actual data
|
# encode the actual data
|
||||||
out = bytearray(b'\x00' * bin_len)
|
out = bytearray(b'\x00' * bin_len)
|
||||||
for srv in in_json.keys():
|
for srv in in_json.keys():
|
||||||
service_nr = int(srv)
|
service_nr = int(srv)
|
||||||
(byte_offset, bit_offset) = EF_ServiceTable._bit_byte_offset_for_service(
|
(byte_offset, bit_offset) = self._bit_byte_offset_for_service(service_nr)
|
||||||
service_nr)
|
|
||||||
bits = 0
|
bits = 0
|
||||||
if in_json[srv]['allocated'] == True:
|
if in_json[srv]['allocated'] == True:
|
||||||
bits |= 1
|
bits |= 1
|
||||||
|
|||||||
Reference in New Issue
Block a user