Change in pysim[master]: BER-TLV EF support (command, filesystem, shell)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Mon May 3 18:07:26 UTC 2021


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/24102 )

Change subject: BER-TLV EF support (command, filesystem, shell)
......................................................................


Patch Set 1: Code-Review-1

(5 comments)

You don't really need 'struct' module. Let's just use to_bytes().

https://gerrit.osmocom.org/c/pysim/+/24102/1/pySim/utils.py 
File pySim/utils.py:

https://gerrit.osmocom.org/c/pysim/+/24102/1/pySim/utils.py@96 
PS1, Line 96: (dict, bytes)
Tuple[dict, bytes]


https://gerrit.osmocom.org/c/pysim/+/24102/1/pySim/utils.py@119 
PS1, Line 119: (int, bytes)
Tuple[int, bytes]


https://gerrit.osmocom.org/c/pysim/+/24102/1/pySim/utils.py@145 
PS1, Line 145: 	if length < 0x80:
Looks like both cases:

  length < 0x80

and

  length <= 0xff

can be handled in one statement:

  if length <= 0xff:
    return length.to_bytes(1, 'big')


https://gerrit.osmocom.org/c/pysim/+/24102/1/pySim/utils.py@150 
PS1, Line 150: struct.pack('!H', length)
length.to_bytes(2, 'big')


https://gerrit.osmocom.org/c/pysim/+/24102/1/pySim/utils.py@152 
PS1, Line 152: struct.pack('!L', length)
length.to_bytes(4, 'big')



-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/24102
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibfcce757dcd477fd0d6857f64fbb4346d6d62e63
Gerrit-Change-Number: 24102
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Comment-Date: Mon, 03 May 2021 18:07:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210503/2188b0bf/attachment.htm>


More information about the gerrit-log mailing list