laforge has uploaded this change for review.
pySim.esim: Allow calling compile_asn1_subdir() with non-DER coddec
this isn't needed for the on-wire format, but can be useful for debug
output in GSER or JER.
Change-Id: I1de4b9506a92d60f582c328a180760332584f9e4
---
M pySim/esim/__init__.py
1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/16/37416/1
diff --git a/pySim/esim/__init__.py b/pySim/esim/__init__.py
index 1f7ea16..fbb90b9 100644
--- a/pySim/esim/__init__.py
+++ b/pySim/esim/__init__.py
@@ -3,7 +3,7 @@
from importlib import resources
-def compile_asn1_subdir(subdir_name:str):
+def compile_asn1_subdir(subdir_name:str, codec='der'):
"""Helper function that compiles ASN.1 syntax from all files within given subdir"""
import asn1tools
asn_txt = ''
@@ -14,7 +14,7 @@
asn_txt += "\n"
#else:
#print(resources.read_text(__name__, 'asn1/rsp.asn'))
- return asn1tools.compile_string(asn_txt, codec='der')
+ return asn1tools.compile_string(asn_txt, codec=codec)
# SGP.22 section 4.1 Activation Code
To view, visit change 37416. To unsubscribe, or for help writing mail filters, visit settings.