Skip to content

Instantly share code, notes, and snippets.

@kylegato
Created August 18, 2015 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylegato/961107006210995239b7 to your computer and use it in GitHub Desktop.
Save kylegato/961107006210995239b7 to your computer and use it in GitHub Desktop.
def _run_command(self, cmd, cwd=None, user=None, env=None):
result = self.salt['cmd.run_all'](cmd, cwd=cwd, runas=user, env=env)
if result['retcode'] > 0:
raise PackageException(result['stdout'])
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment