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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/26038 ) Change subject: cards: use python style commends to describe methods ...................................................................... cards: use python style commends to describe methods Change-Id: Iae862d8f0a191c7015a94f9516ef5804265f7a82 --- M pySim/cards.py 1 file changed, 7 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/38/26038/1 diff --git a/pySim/cards.py b/pySim/cards.py index 95352ff..1a86b14 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -74,9 +74,7 @@ return True def verify_adm(self, key): - ''' - Authenticate with ADM key - ''' + """Authenticate with ADM key""" (res, sw) = self._scc.verify_chv(self._adm_chv_num, key) return sw @@ -135,10 +133,7 @@ return (None, sw) def update_oplmn_act(self, mcc, mnc, access_tech='FFFF'): - """ - See note in update_hplmn_act() - """ - # get size and write EF.OPLMNwAcT + """get size and write EF.OPLMNwAcT, See note in update_hplmn_act()""" data = self._scc.read_binary(EF['OPLMNwAcT'], length=None, offset=0) size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) @@ -154,10 +149,7 @@ return (None, sw) def update_plmn_act(self, mcc, mnc, access_tech='FFFF'): - """ - See note in update_hplmn_act() - """ - # get size and write EF.PLMNwAcT + """get size and write EF.PLMNwAcT, See note in update_hplmn_act()""" data = self._scc.read_binary(EF['PLMNwAcT'], length=None, offset=0) size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) @@ -265,8 +257,8 @@ else: return (None, sw) - # Fetch all the AIDs present on UICC def read_aids(self): + """Fetch all the AIDs present on UICC""" self._aids = [] try: # Find out how many records the EF.DIR has @@ -282,8 +274,8 @@ self._aids = [] return self._aids - # Select ADF.U/ISIM in the Card using its full AID def select_adf_by_aid(self, adf="usim"): + """Select ADF.U/ISIM in the Card using its full AID""" # Find full AID by partial AID: if is_hex(adf): for aid in self._aids: @@ -300,13 +292,13 @@ return self._scc.select_adf(aid) return (None, None) - # Erase the contents of a file def erase_binary(self, ef): + """Erase the contents of a file""" len = self._scc.binary_size(ef) self._scc.update_binary(ef, "ff" * len, offset=0, verify=True) - # Erase the contents of a single record def erase_record(self, ef, rec_no): + """Erase the contents of a single record""" len = self._scc.record_size(ef) self._scc.update_record(ef, rec_no, "ff" * len, force_len=False, verify=True) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/26038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iae862d8f0a191c7015a94f9516ef5804265f7a82 Gerrit-Change-Number: 26038 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211029/d284e58a/attachment.htm>