pySim-prog: rename card_handler to CardHandler
In OOP, we usually use capital letters for class names. The card handler
class should be no execption.
Change-Id: I4b2c06b1c607c993c9aaf0d57ad2352bb6b36e74
diff --git a/pySim-prog.py b/pySim-prog.py
index 922ca86..3b69bb3 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -741,9 +741,9 @@
init_batch(opts)
if opts.card_handler:
- ch = card_handler_auto(sl, opts.card_handler)
+ ch = CardHandlerAuto(sl, opts.card_handler)
else:
- ch = card_handler(sl)
+ ch = CardHandler(sl)
# Iterate
first = True
diff --git a/pySim-shell.py b/pySim-shell.py
index 7977ff5..5644466 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -40,7 +40,7 @@
from pySim.cards import card_detect, SimCard
from pySim.utils import h2b, swap_nibbles, rpad, b2h, h2s, JsonEncoder, bertlv_parse_one
from pySim.utils import dec_st, sanitize_pin_adm, tabulate_str_list, is_hex, boxed_heading_str
-from pySim.card_handler import card_handler
+from pySim.card_handler import CardHandler
from pySim.filesystem import CardMF, RuntimeState, CardDF, CardADF
from pySim.ts_51_011 import CardProfileSIM, DF_TELECOM, DF_GSM
@@ -484,7 +484,7 @@
sl.wait_for_card();
- card_handler = card_handler(sl)
+ card_handler = CardHandler(sl)
card = card_detect("auto", scc)
if card is None:
diff --git a/pySim/card_handler.py b/pySim/card_handler.py
index 9beab51..ef1b071 100644
--- a/pySim/card_handler.py
+++ b/pySim/card_handler.py
@@ -27,7 +27,7 @@
import yaml
# Manual card handler: User is prompted to insert/remove card from the reader.
-class card_handler:
+class CardHandler:
sl = None
@@ -47,7 +47,7 @@
print("")
# Automatic card handler: A machine is used to handle the cards.
-class card_handler_auto:
+class CardHandlerAuto:
sl = None
cmds = None