Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zhentan exitcode #1052

Merged
merged 10 commits into from
Sep 30, 2020
2 changes: 1 addition & 1 deletion azure-devops/azext_devops/dev/common/artifacttool.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _log_message(json_line):
ex = json_line['@x'] if '@x' in json_line else None
if ex:
message = "{}\n{}".format(message, ex)
logger.error(message)
logger.error(message)
if log_level == "Warning":
logger.warning(message)
elif log_level == "Information":
Expand Down
13 changes: 4 additions & 9 deletions azure-devops/azext_devops/dev/common/external_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import signal
import subprocess
import sys
import traceback

import humanfriendly
from knack.log import get_logger
Expand Down Expand Up @@ -49,14 +48,10 @@ def wait(self):
stderr = self._proc.stderr.read().decode('utf-8', 'ignore').strip()
if stderr != "":
stderr = "\n{}".format(stderr)
try:
raise CLIError(
"Process {proc} with PID {pid} exited with return code {code}{err}"
.format(proc=self._args, pid=self._proc.pid, code=self._proc.returncode, err=stderr)
)
except CLIError:
traceback.print_exc()
sys.exit(self._proc.returncode)
raise CLIError(
"Process {proc} with PID {pid} exited with return code {code}{err}"
.format(proc=self._args, pid=self._proc.pid, code=self._proc.returncode, err=stderr)
)
return self._proc

def _sigint_handler(self):
Expand Down