Change in pysim[master]: pySim-shell: refactor __main__ section

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Wed Sep 29 13:27:27 UTC 2021


dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/25484 )

Change subject: pySim-shell: refactor __main__ section
......................................................................


Patch Set 6:

(4 comments)

https://gerrit.osmocom.org/c/pysim/+/25484/2/pySim-shell.py 
File pySim-shell.py:

https://gerrit.osmocom.org/c/pysim/+/25484/2/pySim-shell.py@66 
PS2, Line 66: 		print("No card detected!")
> A more Python'ish way would be to raise exceptions from this function, so you always get nice backtr […]
I wonder if changing this makes the use of this function easier. I think it would not, because then the caller would have to take care about catching the exceptions. Also the errors that are caught here are not uncommon during normal operation. I would prefer to keep the try/catch block here.


https://gerrit.osmocom.org/c/pysim/+/25484/2/pySim-shell.py@71 
PS2, Line 71: 		print("Could not detect card type!")
> Same here, rather throw an exception.
(see above)


https://gerrit.osmocom.org/c/pysim/+/25484/2/pySim-shell.py@535 
PS2, Line 535: ==
> is
Done


https://gerrit.osmocom.org/c/pysim/+/25484/2/pySim-shell.py@535 
PS2, Line 535: ==
> is
Done



-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/25484
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id2a0f2012b84ce61f5c0c14404df559fca4ddfcd
Gerrit-Change-Number: 25484
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-CC: osmith <osmith at sysmocom.de>
Gerrit-Comment-Date: Wed, 29 Sep 2021 13:27:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210929/f04eccce/attachment.htm>


More information about the gerrit-log mailing list