laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/36507?usp=email )

Change subject: esim.es2p: Permit ApiParamInteger to be an actual integer
......................................................................

esim.es2p: Permit ApiParamInteger to be an actual integer

Usually, the specifications say that the integer type is actually
transmitted as a JSON string type.  However, it seems some
implementations do return a native JSON integer type.  Let's be
tolerant in that regard.

Change-Id: I5b47f8bba01225d53eff2ca086e53a2133abed7f
---
M pySim/esim/es2p.py
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved




diff --git a/pySim/esim/es2p.py b/pySim/esim/es2p.py
index 32d1ef8..af45b0b 100644
--- a/pySim/esim/es2p.py
+++ b/pySim/esim/es2p.py
@@ -86,6 +86,8 @@

     @classmethod
     def verify_encoded(cls, data):
+        if isinstance(data, int):
+            return
         if not data.isdecimal():
             raise ValueError('integer (%s) contains non-decimal characters' % 
data)
         assert str(int(data)) == data

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36507?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5b47f8bba01225d53eff2ca086e53a2133abed7f
Gerrit-Change-Number: 36507
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-MessageType: merged

Reply via email to