Initialize passphrase cache at UI c-tor

This commit is contained in:
Roman Zeyde
2020-04-29 21:59:17 +03:00
parent 8c22e5030b
commit 52d840cbbb
3 changed files with 2 additions and 7 deletions

View File

@@ -249,8 +249,6 @@ def run_agent(device_type):
pubkey_bytes = keyring.export_public_keys(env=env)
device_type.ui = device.ui.UI(device_type=device_type,
config=vars(args))
device_type.ui.cached_passphrase_ack = util.ExpiringCache(
seconds=float(args.cache_expiry_seconds))
handler = agent.Handler(device=device_type(),
pubkey_bytes=pubkey_bytes)
@@ -318,7 +316,5 @@ def main(device_type):
args = parser.parse_args()
device_type.ui = device.ui.UI(device_type=device_type, config=vars(args))
device_type.ui.cached_passphrase_ack = util.ExpiringCache(
seconds=float(args.cache_expiry_seconds))
return args.func(device_type=device_type, args=args)