Attention is currently required from: dexter. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37839?usp=email )
Change subject: pySim-shell: prevent opening/closing logical channel 0 ...................................................................... Patch Set 1: (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/37839/comment/31ffa4e8_7065ba14?usp=email : PS1, Line 974: raise RuntimeError("Cannot create (always existing) basic logical lchan 0") Id'd have assumed raising a ValueError is more correct, as it's a wrong value. We might also handle this already at the argparse level by introducig a more specific 'type' than 'int'. This is what we do in the type=is_hexstr case. We could have a is_lchan_nr method which checks for a valid number (not zero, not too high). Handling those kind of things in argparse is more elegant, IMHO. It avoids open-coding checks all over the code. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37839?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4eebd9f15fadd18e1caeb033fda36c59446fcab8 Gerrit-Change-Number: 37839 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <[email protected]> Gerrit-Attention: dexter <[email protected]> Gerrit-Comment-Date: Fri, 16 Aug 2024 17:05:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
