<p><a href="https://gerrit.osmocom.org/c/pysim/+/24342">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py">File contrib/sim-rest-client.py:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py@39">Patch Set #2, Line 39:</a> <code style="font-family:monospace,monospace">    x2, x3 = struct.unpack('>IH', x)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I guess you could do this without using struct at all:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  int.from_bytes(x, byteorder='big')</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py@46">Patch Set #2, Line 46:</a> <code style="font-family:monospace,monospace">    return struct.pack('>IH', x2, x3)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Also here:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  x.to_bytes(48 // 8, byteorder='big')</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py@48">Patch Set #2, Line 48:</a> <code style="font-family:monospace,monospace">dict</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">If all values in this dict() are bytes, then:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  Dict[str, bytes]</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py@61">Patch Set #2, Line 61:</a> <code style="font-family:monospace,monospace">def milenage_auts(opc:bytes, k:bytes, rand:bytes, auts:bytes):</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I would raise a RuntimeError directly from here, or alternatively:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  -> Optional[bytes]</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py@84">Patch Set #2, Line 84:</a> <code style="font-family:monospace,monospace">js:dict = None</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">js:Optional[dict]</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py@87">Patch Set #2, Line 87:</a> <code style="font-family:monospace,monospace">    if verbose:</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">What about log.debug()?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24342/2/contrib/sim-rest-client.py@99">Patch Set #2, Line 99:</a> <code style="font-family:monospace,monospace">    global server_port, server_host, verbose</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I would just pass 'args' to build_url(), but not critical.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/24342">change 24342</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/24342"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I738ca3109ab038d4f5595cc1dab6a49087df5886 </div>
<div style="display:none"> Gerrit-Change-Number: 24342 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 23 May 2021 15:20:21 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>