lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2025

  • 1 participants
  • 1491 discussions
[S] Change in pysim[master]: javacard, cosmetic: fix sourcecode fromatting and improve docstring
by dexter 02 Jan '25

02 Jan '25
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/39194?usp=email ) Change subject: javacard, cosmetic: fix sourcecode fromatting and improve docstring ...................................................................... javacard, cosmetic: fix sourcecode fromatting and improve docstring The line with TAGS is longer than 120 columns and there is some comment that should be moved to the python docstring. Related: OS#6679 Change-Id: I1d02098320cfbe17a0eb1bfdcf3bc85034cc8e20 --- M pySim/javacard.py 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/javacard.py b/pySim/javacard.py index 46f6ec0..07b0f39 100644 --- a/pySim/javacard.py +++ b/pySim/javacard.py @@ -6,14 +6,16 @@ import io def ijc_to_cap(in_file: io.IOBase, out_zip: zipfile.ZipFile, p : str = "foo"): - """Convert an ICJ (Interoperable Java Card) file [back] to a CAP file.""" - TAGS = ["Header", "Directory", "Applet", "Import", "ConstantPool", "Class", "Method", "StaticField", "RefLocation", "Export", "Descriptor", "Debug"] + """Convert an ICJ (Interoperable Java Card) file [back] to a CAP file. + example usage: + with io.open(sys.argv[1],"rb") as f, zipfile.ZipFile(sys.argv[2], "wb") as z: + ijc_to_cap(f, z) + """ + TAGS = ["Header", "Directory", "Applet", "Import", "ConstantPool", "Class", "Method", "StaticField", "RefLocation", + "Export", "Descriptor", "Debug"] b = in_file.read() while len(b): tag, size = struct.unpack('!BH', b[0:3]) out_zip.writestr(p+"/javacard/"+TAGS[tag-1]+".cap", b[0:3+size]) b = b[3+size:] -# example usage: -# with io.open(sys.argv[1],"rb") as f, zipfile.ZipFile(sys.argv[2], "wb") as z: -# ijc_to_cap(f, z) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/39194?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d02098320cfbe17a0eb1bfdcf3bc85034cc8e20 Gerrit-Change-Number: 39194 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 147
  • 148
  • 149
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.