Attention is currently required from: laforge.
4 comments:
File pySim/filesystem.py:
def _decode_bin(self, raw_bin_data: bytearray):
chunks = [raw_bin_data[i:i+self.rec_len]
for i in range(0, len(raw_bin_data), self.rec_len)]
return [self.decode_record_bin(x) for x in chunks]
def _encode_bin(self, abstract_data) -> bytes:
chunks = [self.encode_record_bin(x) for x in abstract_data]
# FIXME: pad to file size
return b''.join(chunks)
There's nothing wrong with anticipating future extensions and passing through `**kwargs`. […]
Acknowledged
File pySim/filesystem.py:
Patch Set #5, Line 746: __get_size
so this function now actually doesn't return the size, but it returns a dict with a single element […]
Yes, that's really odd. I thought it would simplify things a bit when we were using it only with build_construct(), but now we use it in other places too. I have changed it now.
Patch Set #5, Line 1343: def _encode_bin(self, abstract_data, total_len: int = None, **kwargs) -> bytes:
this also doesn't really match the code above. […]
Done
File pySim/gsm_r.py:
Patch Set #5, Line 293: def _encode_record_bin(self, abstract_data : dict, record_nr : int, **kwargs) -> bytearray:
_encode_record_bin now just has **kwargs, while the _encode_bin has a dedicated total_len argument. […]
I think we should use **kwargs to transfer total_len. In most cases total_len is not needed at all, so I think **kwargs is the better option here.
To view, visit change 38195. To unsubscribe, or for help writing mail filters, visit settings.