diff options
author | Alice Ferrazzi <alicef@gentoo.org> | 2017-07-20 13:12:38 +0900 |
---|---|---|
committer | Alice Ferrazzi <alicef@gentoo.org> | 2017-07-20 13:12:38 +0900 |
commit | 06ca1c6ec5a012cda3b0d3530716847c8a3ae6e0 (patch) | |
tree | 85dd9c8fefa599fc24bdc792008b94217763e072 | |
parent | lpatch added locally (diff) | |
download | elivepatch-06ca1c6ec5a012cda3b0d3530716847c8a3ae6e0.tar.gz elivepatch-06ca1c6ec5a012cda3b0d3530716847c8a3ae6e0.tar.bz2 elivepatch-06ca1c6ec5a012cda3b0d3530716847c8a3ae6e0.zip |
Static patch and config filename on send
This is useful for encapsulating the api call using only the uuid as
session identifier
-rw-r--r-- | elivepatch_client/client/restful.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/elivepatch_client/client/restful.py b/elivepatch_client/client/restful.py index c183da5..517af44 100644 --- a/elivepatch_client/client/restful.py +++ b/elivepatch_client/client/restful.py @@ -47,8 +47,8 @@ class ManaGer(object): 'KernelVersion' : self.kernel_version, 'UUID': self.uuid } - patch_filename = (os.path.split(patch_fullpath))[1] - files = {'patch': (patch_filename, open(patch_fullpath, 'rb'), 'multipart/form-data', {'Expires': '0'}), + # Static patch and config filename + files = {'patch': ('01.patch', open(patch_fullpath, 'rb'), 'multipart/form-data', {'Expires': '0'}), 'config': ('config', open(temporary_config.name, 'rb'), 'multipart/form-data', {'Expires': '0'})} print(str(files)) temporary_config.close() |