From d626d83c7d5000b32b78ff074a8d3af5431a4397 Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Thu, 2 Apr 2015 08:59:34 -0700 Subject: [PATCH] Handle case where we miss first sign-in --- salt/crypt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/crypt.py b/salt/crypt.py index c191653715..5addc08c57 100644 --- a/salt/crypt.py +++ b/salt/crypt.py @@ -419,7 +419,10 @@ class AsyncAuth(object): continue break if not isinstance(creds, dict) or 'aes' not in creds: - del AsyncAuth.creds_map[self.__key(self.opts)] + try: + del AsyncAuth.creds_map[self.__key(self.opts)] + except KeyError: + pass self._authenticate_future.set_exception( SaltClientError('Attempt to authenticate with the salt master failed') )