You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2021/01/23 10:57:09 UTC
[libcloud] branch trunk updated: Use mkstemp instead.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
The following commit(s) were added to refs/heads/trunk by this push:
new 1749a7f Use mkstemp instead.
1749a7f is described below
commit 1749a7f402ec5b0c8c5bf0c3d48339f447e68f91
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sat Jan 23 11:56:24 2021 +0100
Use mkstemp instead.
---
libcloud/test/storage/test_azure_blobs.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcloud/test/storage/test_azure_blobs.py b/libcloud/test/storage/test_azure_blobs.py
index 10f8f60..9d3eb3c 100644
--- a/libcloud/test/storage/test_azure_blobs.py
+++ b/libcloud/test/storage/test_azure_blobs.py
@@ -775,7 +775,7 @@ class AzureBlobsTests(unittest.TestCase):
self.assertTrue('some-value' in obj.meta_data)
def test_upload_big_block_object_success(self):
- file_path = tempfile.mktemp(suffix='.jpg')
+ _, file_path = tempfile.mkstemp(suffix='.jpg')
file_size = AZURE_UPLOAD_CHUNK_SIZE + 1
with open(file_path, 'w') as file_hdl:
@@ -820,7 +820,7 @@ class AzureBlobsTests(unittest.TestCase):
def test_upload_big_block_object_success_with_lease(self):
self.mock_response_klass.use_param = 'comp'
- file_path = tempfile.mktemp(suffix='.jpg')
+ _, file_path = tempfile.mkstemp(suffix='.jpg')
file_size = AZURE_UPLOAD_CHUNK_SIZE * 2
with open(file_path, 'w') as file_hdl: