[elbe-devel] [PATCH 07/11] soapclient: Add enable coverage option

Olivier Dion dion at linutronix.de
Mon Aug 17 18:20:16 CEST 2020


Also change 'elbe-control-get-file' to accept a destination argument.

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/soapclient.py | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index bc27fa7f..f9501e35 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -265,9 +265,8 @@ class CreateProjectAction(ClientAction):
     def __init__(self, node):
         ClientAction.__init__(self, node)
 
-    def execute(self, client, _opt, _args):
-
-        uuid = client.service.new_project()
+    def execute(self, client, opt, _args):
+        uuid = client.service.new_project(opt.en_coverage)
         print(uuid)
 
 
@@ -476,15 +475,19 @@ class GetFileAction(ClientAction):
         ClientAction.__init__(self, node)
 
     def execute(self, client, opt, args):
-        if len(args) != 2:
-            print(
-                "usage: elbe control get_file <project_dir> <file>",
-                file=sys.stderr)
+
+        if len(args) < 2 or len(args) > 3:
+            print("usage: elbe control get_file <project_dir> <file> [dst]",
+                  file=sys.stderr)
             sys.exit(20)
 
         builddir = args[0]
         filename = args[1]
-        dst_fname = filename
+
+        if len(args) == 3:
+            dst_fname = args[2]
+        else:
+            dst_fname = filename
 
         if opt.output:
             fs = Filesystem('/')
-- 
2.28.0



More information about the elbe-devel mailing list