mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
There are instances where a TLV IE is used as just a flag, i.e. length zero and no value part. In those situations, it would require a lot of boilerplate code to require the TLV_IE class definitions to have _to_bytes/_from_bytes methods that do nothing. So instead, add a shortcut: If we want to encode 'None', then return b'', and if we want to decode b'' return None. Change-Id: Ie8eb2830e8eefa81e94b8b8b157062c085aeb777