From 0439b099844fb018e72b1988248b58ebd63c0a67 Mon Sep 17 00:00:00 2001 From: Federico Pires Date: Mon, 31 Jul 2017 13:39:35 -0300 Subject: [PATCH] Issue 105 - Verify token by making a requests to salt-api --- pepper/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pepper/cli.py b/pepper/cli.py index 0962c3e..6160df4 100644 --- a/pepper/cli.py +++ b/pepper/cli.py @@ -428,6 +428,7 @@ def run(self): if api.auth['expire'] < time.time()+30: logger.error('Login token expired') raise Exception('Login token expired') + api.req('/stats') except Exception as e: if e.args[0] is not 2: logger.error('Unable to load login token from ~/.peppercache '+str(e))