From 5c623c1e93675c33d48a27c8a790054bc14f3eed Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Wed, 16 Oct 2013 09:54:11 -0600 Subject: [PATCH] Fix mine lint errors --- salt/modules/mine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/modules/mine.py b/salt/modules/mine.py index c3c3596cb8..7b825cdc96 100644 --- a/salt/modules/mine.py +++ b/salt/modules/mine.py @@ -64,6 +64,7 @@ def update(clear=False): log.error('Function {0} in mine_functions failed to execute' .format(func)) continue + auth = _auth() load = { 'cmd': '_mine', 'data': data, @@ -72,7 +73,6 @@ def update(clear=False): 'tok': auth.gen_token('salt'), } sreq = salt.payload.SREQ(__opts__['master_uri']) - auth = _auth() try: sreq.send('aes', auth.crypticle.dumps(load), 1, 0) except Exception: @@ -111,6 +111,7 @@ def send(func, *args, **kwargs): log.error('Function {0} in mine.send failed to execute: {1}' .format(func, exc)) return False + auth = _auth() load = { 'cmd': '_mine', 'data': data, @@ -118,7 +119,6 @@ def send(func, *args, **kwargs): 'tok': auth.gen_token('salt'), } sreq = salt.payload.SREQ(__opts__['master_uri']) - auth = _auth() try: sreq.send('aes', auth.crypticle.dumps(load), 1, 10) except Exception: