From be86507e00b1a0592355748b5cd7495dd7201f3c Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 6 Feb 2016 17:52:49 +0200 Subject: [PATCH] client: pass index as default argument --- trezor_agent/trezor/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trezor_agent/trezor/client.py b/trezor_agent/trezor/client.py index 3d620db..cc9a710 100644 --- a/trezor_agent/trezor/client.py +++ b/trezor_agent/trezor/client.py @@ -18,7 +18,6 @@ class Client(object): self.identity_type = client_wrapper.identity_type self.device_name = client_wrapper.device_name self.curve = curve - self.identity_index = 0 def __enter__(self): msg = 'Hello World!' @@ -30,10 +29,10 @@ class Client(object): self.client.clear_session() # forget PIN and shutdown screen self.client.close() - def get_identity(self, label): + def get_identity(self, label, index=0): identity = string_to_identity(label, self.identity_type) identity.proto = 'ssh' - identity.index = self.identity_index + identity.index = index return identity def get_public_key(self, label):