aboutsummaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorhenryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b>2005-10-03 05:19:53 +0000
committerhenryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b>2005-10-03 05:19:53 +0000
commit5720cb30f617c8dfd0acbdec5b824969a6767b1a (patch)
tree5f59fcd6358153f509992182391d4056f9313f38 /utils.py
parentbed37517c6dcf0121e3da5e47962ed5a491ec47c (diff)
docstrings
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@28 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index c7366a7..6ecfa62 100644
--- a/utils.py
+++ b/utils.py
@@ -87,6 +87,7 @@ def _unformat_hexdump(dump):
class APDU(list):
+ """Class for an APDU that mostly behaves like a list."""
OFFSET_CLA = 0
OFFSET_INS = 1
OFFSET_P1 = 2
@@ -98,7 +99,6 @@ class APDU(list):
LC_AUTO = None
- """Class for an APDU that mostly behaves like a list."""
def __init__(self, *args, **kwargs):
"""Creates a new APDU instance. Can be given positional parameters which
must be sequences of either strings (or strings themselves) or integers
@@ -195,6 +195,7 @@ class APDU(list):
return result
def get_string(self):
+ """Return the contents of this APDU as a binary string."""
return "".join([i is not None and chr(i) or "?" for i in self])
if __name__ == "__main__":