diff options
author | Henryk Plötz <henryk@ploetzli.ch> | 2010-10-15 18:24:34 +0200 |
---|---|---|
committer | Henryk Plötz <henryk@ploetzli.ch> | 2010-10-18 06:05:45 +0200 |
commit | e3433526753f07dd500352ded6e5bcbbb8c39e2e (patch) | |
tree | d76bd920f5bddf6925bac951a2270afd96046818 | |
parent | 20b8d8167ee864c88287412da224d93c17381a08 (diff) |
Rename parse_fancy_apdu to parse_fancy
-rw-r--r-- | cards/passport_application.py | 2 | ||||
-rwxr-xr-x | cyberflex-shell.py | 4 | ||||
-rw-r--r-- | utils.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/cards/passport_application.py b/cards/passport_application.py index 943038f..9e5280f 100644 --- a/cards/passport_application.py +++ b/cards/passport_application.py @@ -53,7 +53,7 @@ class Passport_Security_Environment(TCOS_Security_Environment): new_apdu.append("8E()00") new_apdu_string = "".join(new_apdu) - apdu = C_APDU.parse_fancy_apdu(new_apdu_string) + apdu = C_APDU.parse_fancy(new_apdu_string) return TCOS_Security_Environment.before_send(self, apdu) diff --git a/cyberflex-shell.py b/cyberflex-shell.py index db561c4..9ff3339 100755 --- a/cyberflex-shell.py +++ b/cyberflex-shell.py @@ -216,7 +216,7 @@ class Cyberflex_Shell(Shell): def cmd_fancy(self, *args): "Parse a fancy APDU and print the result" - apdu = utils.C_APDU.parse_fancy_apdu(*args) + apdu = utils.C_APDU.parse_fancy(*args) data = apdu.render() if hasattr(self, "card"): self.card.last_result = utils.R_APDU(data+"\x00\x00") @@ -233,7 +233,7 @@ class Cyberflex_Shell(Shell): "Parse and transmit a fancy APDU" apdu = None try: - apdu = utils.C_APDU.parse_fancy_apdu(*args) + apdu = utils.C_APDU.parse_fancy(*args) except ValueError: raise NotImplementedError @@ -319,7 +319,7 @@ class C_APDU(Command_Frame,APDU): _apduregex = re.compile(r'^\s*([0-9a-f]{2}\s*){4,}$', re.I) _fancyapduregex = re.compile(r'^\s*([0-9a-f]{2}\s*){4,}\s*((xx|yy)\s*)?(([0-9a-f]{2}|:|\)|\(|\[|\])\s*)*$', re.I) @staticmethod - def parse_fancy_apdu(*args): + def parse_fancy(*args): apdu_string = " ".join(args) if not C_APDU._fancyapduregex.match(apdu_string): raise ValueError |