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:
Vadim Yanitskiy 2023-04-22 19:55:00 +07:00 committed by laforge
parent e63cb2cc4d
commit 6b19d80229
1 changed files with 2 additions and 4 deletions

View File

@ -670,16 +670,14 @@ class EF_ServiceTable(TransparentEF):
bin_len = 0
for srv in in_json.keys():
service_nr = int(srv)
(byte_offset, bit_offset) = EF_ServiceTable._bit_byte_offset_for_service(
service_nr)
(byte_offset, bit_offset) = self._bit_byte_offset_for_service(service_nr)
if byte_offset >= bin_len:
bin_len = byte_offset+1
# encode the actual data
out = bytearray(b'\x00' * bin_len)
for srv in in_json.keys():
service_nr = int(srv)
(byte_offset, bit_offset) = EF_ServiceTable._bit_byte_offset_for_service(
service_nr)
(byte_offset, bit_offset) = self._bit_byte_offset_for_service(service_nr)
bits = 0
if in_json[srv]['allocated'] == True:
bits |= 1