diff --git a/tests/openpgp_card.py b/tests/openpgp_card.py index 786d057..c4c182d 100644 --- a/tests/openpgp_card.py +++ b/tests/openpgp_card.py @@ -270,8 +270,8 @@ class OpenPGP_Card(object): raise ValueError(sw) if sw[0] == 0x61: return self.cmd_get_response(sw[1]) - if (sw[-2] == 0x61): - return self.cmd_get_response(sw[-1]) + elif (sw[-2] == 0x61): + return sw + self.cmd_get_response(sw[-1]) elif sw[-2] == 0x90 and sw[-1] == 0x00: return sw[0:-2] if sw[0] == 0x6a and sw[1] == 0x88: