[elbe-devel] [PATCH 19/21] elbepack: pbuilder: use generic error handling for tar invocation
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Aug 6 11:18:17 CEST 2024
Let the exception bubble up, for the generic error handling to kick in.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/commands/pbuilder.py | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/elbepack/commands/pbuilder.py b/elbepack/commands/pbuilder.py
index 97b6d4726bfc..a2090bca5c3d 100644
--- a/elbepack/commands/pbuilder.py
+++ b/elbepack/commands/pbuilder.py
@@ -4,7 +4,6 @@
import argparse
import subprocess
-import sys
from elbepack.cli import add_argument, add_arguments_from_decorated_function
from elbepack.commands.preprocess import add_xmlpreprocess_passthrough_arguments
@@ -108,13 +107,9 @@ def _build(control, args):
print('')
print('Packing Source into tmp archive')
print('')
- try:
- subprocess.run(['tar', '-C', args.srcdir, '-czf', tmp.fname('pdebuild.tar.gz'), '.'],
- check=True)
- except subprocess.CalledProcessError:
- print('tar Failed', file=sys.stderr)
- print('Giving up', file=sys.stderr)
- sys.exit(164)
+
+ subprocess.run(['tar', '-C', args.srcdir, '-czf', tmp.fname('pdebuild.tar.gz'), '.'],
+ check=True)
for of in args.origfile:
print('')
--
2.46.0
More information about the elbe-devel
mailing list