From deaa312b7de98e986f0060d9081cdc039d574ae9 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Thu, 21 Oct 2021 20:18:21 +0200 Subject: [PATCH] feature(keyringctl): print a stack trace in case a system cmd fails --- keyringctl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyringctl b/keyringctl index f80173a..c1990b3 100755 --- a/keyringctl +++ b/keyringctl @@ -26,6 +26,7 @@ from sys import exit from sys import stderr from tempfile import TemporaryDirectory from tempfile import mkdtemp +from traceback import print_stack from typing import Dict from typing import List from typing import NewType @@ -131,6 +132,7 @@ def system(cmd: List[str], exit_on_error: bool = True) -> str: return check_output(cmd, stderr=PIPE).decode() except CalledProcessError as e: stderr.buffer.write(e.stderr) + print_stack() if exit_on_error: exit(e.returncode) raise e