API change: let read_binary_file return two values

git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@220 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
hploetz 2007-06-08 00:09:55 +00:00
parent 84e812ebf7
commit 7d2f9b4da5
1 changed files with 2 additions and 2 deletions

View File

@ -122,11 +122,11 @@ class Card_with_read_binary:
if had_one: ## If there was at least one successful pass, ignore any error SW. It probably only means "end of file"
self.sw_changed = False
return contents
return contents, result.sw
def cmd_cat(self):
"Print a hexdump of the currently selected file (e.g. consecutive READ BINARY)"
contents = self.read_binary_file()
contents, sw = self.read_binary_file()
self.last_result = R_APDU(contents + self.last_sw)
print utils.hexdump(contents,linelen=self.HEXDUMP_LINELEN)