From 8b30023b8253211e9f0cd90f1b671ea8441f0ee3 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Mon, 2 Sep 2013 23:53:17 -0600 Subject: [PATCH] clean up lint errors --- salt/client/ssh/__init__.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py index a41b590052..21e77b4837 100644 --- a/salt/client/ssh/__init__.py +++ b/salt/client/ssh/__init__.py @@ -200,7 +200,7 @@ class SSH(object): opts['arg_str'], host, target) - ret['id'] = single.id + ret = {'id': single.id} stdout, stderr = single.run() if stdout.startswith('deploy'): single.deploy() @@ -243,7 +243,7 @@ class SSH(object): host, self.targets[host], ) - routine = threading.Thread(target=handle_routine, args=args) + routine = threading.Thread(target=self.handle_routine, args=args) running[host]['thread'] = routine.start() continue ret = que.get() @@ -348,13 +348,11 @@ class Single(object): 3. Execute a wrapper func ''' if self.opts.get('raw_shell'): - for stdout, stderr in self.shell.exec_cmd(self.opts['raw_shell']): - else: - return stdout, stderr + return self.shell.exec_cmd(self.opts['raw_shell']) elif self.fun in self.wfuncs: # Ensure that opts/grains are up to date # Execute routine - cdir = os.path.join(self.opts['cachedir'], 'minions', load['id']) + cdir = os.path.join(self.opts['cachedir'], 'minions', self.id) if not os.path.isdir(cdir): os.makedirs(cdir) datap = os.path.join(cdir, 'data.p') @@ -422,15 +420,6 @@ class Single(object): cmd = HEREDOC.format(self.arg_str) return self.shell.exec_cmd(cmd) - def highstate_seed(self): - ''' - Generate an archive file which contains the instructions and files - to execute a state run on a remote system - ''' - st_ = SSHHighState(self.opts, None, wrapper) - lowstate = st_.compile_low_chunks() - #file_refs = salt.utils.lowstate_file_refs(lowstate) - def sls_seed(self, mods, env='base', test=None, exclude=None, **kwargs): ''' Create the seed file for a state.sls run