def local(self, cmd, *args, **kwargs): cmd = self._wrap_cmd(cmd, 'lcwd') self._output(prefixlines('localhost', "running", cmd, "blue")) start = time.time() status = local(cmd, output=False, *args, **kwargs) end = time.time() try: self._check_status(status) except BadReturnCode: self._output(cmd_status(end - start, 'localhost', cmd, status, state='failed', color="red"), logging.warning) raise self._output(cmd_status(end - start, 'localhost', cmd, status)) return status
def local(self, cmd, *args, **kwargs): cmd = self._wrap_cmd(cmd, 'lcwd') self._output(prefixlines('localhost', "running", cmd, "blue")) start = time.time() status = local(cmd, output=False, *args, **kwargs) end = time.time() try: self._check_status(status) except BadReturnCode: self._output( cmd_status(end - start, 'localhost', cmd, status, state='failed', color="red"), logging.warning) raise self._output(cmd_status(end - start, 'localhost', cmd, status)) return status
def local(self, cmd, *args, **kwargs): cmd = self._wrap_cmd(cmd, "lcwd") status = local(cmd, output=False, *args, **kwargs) self._output("localhost", cmd, status) return status
def local(self, cmd, *args, **kwargs): cmd = self._wrap_cmd(cmd, "lcwd") return local(cmd, *args, **kwargs)