diff options
author | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2006-10-25 13:31:43 +0000 |
---|---|---|
committer | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2006-10-25 13:31:43 +0000 |
commit | db5f07df0436b5a5c389374b1fa66a2407eabab7 (patch) | |
tree | 71e1ee971e8624252d4e17f238e8843cdead2c12 /cyberflex-shell.py | |
parent | b3ea921b2f6062c7b6c00e22606c38be932081e9 (diff) |
minor tweaks
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@120 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'cyberflex-shell.py')
-rwxr-xr-x | cyberflex-shell.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cyberflex-shell.py b/cyberflex-shell.py index 8329b43..fef0ed8 100755 --- a/cyberflex-shell.py +++ b/cyberflex-shell.py @@ -123,7 +123,7 @@ class Cyberflex_Shell(Shell): def parse_fancy_apdu(*args): apdu_string = " ".join(args) if not Cyberflex_Shell._fancyapduregex.match(apdu_string): - raise NotImplementedError + raise ValueError apdu_string = apdu_string.lower() have_le = False @@ -139,7 +139,7 @@ class Cyberflex_Shell(Shell): apdu_tail = apdu_string[pos+2:] if apdu_head.strip() != "" and not Cyberflex_Shell._apduregex.match(apdu_head): - raise NotImplementedError + raise ValueError stack = [""] for char in apdu_tail: @@ -147,7 +147,7 @@ class Cyberflex_Shell(Shell): stack[-1] = stack[-1] + char elif char == ")": if len(stack) == 1: - raise NotImplementedError + raise ValueError else: inner_content = stack.pop() l = len("".join(inner_content.split())) @@ -158,10 +158,10 @@ class Cyberflex_Shell(Shell): elif char == "(": stack.append("") else: - raise NotImplementedError + raise ValueError if len(stack) > 1: - raise NotImplementedError + raise ValueError apdu_string = stack[0] |