[elbe-devel] [PATCH 05/21] elbepack: pbuilder: call wait_busy() directly
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Aug 6 11:18:03 CEST 2024
Instead of going through "elbe control" call the wait_busy() method
directly. This reuses existing connections and improves the error
reporting.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/commands/pbuilder.py | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/elbepack/commands/pbuilder.py b/elbepack/commands/pbuilder.py
index ed353960369b..08c94eec1687 100644
--- a/elbepack/commands/pbuilder.py
+++ b/elbepack/commands/pbuilder.py
@@ -82,12 +82,7 @@ def _create(control, args):
print('Giving up', file=sys.stderr)
sys.exit(156)
- try:
- run_elbe(['control', 'wait_busy', prjdir], check=True)
- except subprocess.CalledProcessError:
- print('elbe control wait_busy Failed', file=sys.stderr)
- print('Giving up', file=sys.stderr)
- sys.exit(157)
+ control.wait_busy(prjdir)
print('')
print('Building Pbuilder finished !')
@@ -150,12 +145,7 @@ def _build(control, args):
print('Giving up', file=sys.stderr)
sys.exit(161)
- try:
- run_elbe(['control', 'wait_busy', prjdir], check=True)
- except subprocess.CalledProcessError:
- print('elbe control wait_busy Failed', file=sys.stderr)
- print('Giving up', file=sys.stderr)
- sys.exit(162)
+ control.wait_busy(prjdir)
print('')
print('Building Pbuilder finished !')
@@ -202,12 +192,9 @@ def _build(control, args):
print('elbe control set_pdebuild Failed', file=sys.stderr)
print('Giving up', file=sys.stderr)
sys.exit(166)
- try:
- run_elbe(['control', 'wait_busy', prjdir], check=True)
- except subprocess.CalledProcessError:
- print('elbe control wait_busy Failed', file=sys.stderr)
- print('Giving up', file=sys.stderr)
- sys.exit(167)
+
+ control.wait_busy(prjdir)
+
print('')
print('Pdebuild finished !')
print('')
--
2.46.0
More information about the elbe-devel
mailing list