From 0b699dceb41f50f13a2f49ee12e88fbab38a6940 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 20 Jun 2011 10:50:34 +0200 Subject: [PATCH] [entropy.client.interfaces] always use prefix= with mkstemp() --- libraries/entropy/client/interfaces/methods.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libraries/entropy/client/interfaces/methods.py b/libraries/entropy/client/interfaces/methods.py index 6a3385449..150ad0efc 100644 --- a/libraries/entropy/client/interfaces/methods.py +++ b/libraries/entropy/client/interfaces/methods.py @@ -990,7 +990,8 @@ class RepositoryMixin: @rtype: entropy.client.interfaces.db.GenericRepository """ if temp_file is None: - tmp_fd, temp_file = tempfile.mkstemp() + tmp_fd, temp_file = tempfile.mkstemp( + prefix="entropy.client.methods.open_temp_repository") os.close(tmp_fd) if dbname is not None: # backward compatibility @@ -1829,7 +1830,8 @@ class MiscMixin: for mirror in pkg_mirrors: - tmp_fd, tmp_path = tempfile.mkstemp() + tmp_fd, tmp_path = tempfile.mkstemp( + prefix="entropy.client.methods.reorder_mirrors") try: url_data = entropy.tools.spliturl(mirror) @@ -2009,7 +2011,8 @@ class MiscMixin: tmp_path = initialized_repository_path already_initialized = True else: - tmp_fd, tmp_path = tempfile.mkstemp() + tmp_fd, tmp_path = tempfile.mkstemp( + prefix="entropy.client.methods._inject_edb") try: dbconn = self.open_generic_repository(tmp_path) @@ -2457,7 +2460,8 @@ class MatchMixin: for mask_file in new_mask_list: - tmp_fd, tmp_path = tempfile.mkstemp() + tmp_fd, tmp_path = tempfile.mkstemp( + prefix="entropy.client.methods._clear_match_gen") with open(mask_file, "r") as mask_f: with os.fdopen(tmp_fd, "w") as tmp_f: