[elbe-devel] [PATCH 07/18] elbepack: initvm: call new_project() directly
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Aug 13 13:15:37 CEST 2024
Instead of going through "elbe control", call the new_project()
method directly. This reuses existing connections and improves the error
reporting.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/initvmaction.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index e8806c8caaa0..e4f5c4e48ad8 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -108,10 +108,7 @@ def _submit_and_dl_result(control, xmlfile, cdrom, args):
with preprocess_file(xmlfile, variants=args.variants, sshport=args.sshport,
soapport=args.soapport) as xmlfile:
- ps = run_elbe(['control', 'create_project'],
- capture_output=True, encoding='utf-8', check=True)
-
- prjdir = ps.stdout.strip()
+ prjdir = control.service.new_project()
ps = run_elbe(['control', 'set_xml', prjdir, xmlfile],
capture_output=True, encoding='utf-8', check=True)
--
2.46.0
More information about the elbe-devel
mailing list