[elbe-devel] [PATCH 1/4] soapclient: apply os.path.basename to filename in upload package
Torben Hohn
torben.hohn at linutronix.de
Thu Apr 26 17:01:46 CEST 2018
passing absolute paths to "elbe prjrepo upload_file" results
in Errors, because the filename is generated via
os.path.join (builddir, fname) in the soap server
this yields fname for absolute path fname.
fix this on the the client side, by passing os.path.basename(f)
to the soapmethod.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/soapclient.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index 785e217c..16c90687 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -830,12 +830,12 @@ class UploadPackageAction(RepoAction):
# finish upload
if len(xml_base64) == 1:
part = client.service.upload_file(builddir,
- f,
+ os.path.basename(f),
xml_base64,
-1)
else:
part = client.service.upload_file(builddir,
- f,
+ os.path.basename(f),
xml_base64,
part)
if part == -1:
@@ -889,7 +889,7 @@ class UploadPackageAction(RepoAction):
self.upload_file(client, f, builddir)
print("Including Package in initvm...")
- client.service.include_package(builddir, filename)
+ client.service.include_package(builddir, os.path.basename(filename))
RepoAction.register(UploadPackageAction)
--
2.11.0
More information about the elbe-devel
mailing list