Ensure different tmp-file names if os.getpid() is not available

This commit is contained in:
Mark Qvist committed 2026-05-20 19:52:55 +02:00
1 parent 7f0e2627d1
commit d6ec05193b
1 file changed
+1 -1
+1 -1
View File
@@ -672,7 +672,7 @@ class LXMessage:
def write_to_directory(self, directory_path):
file_name = RNS.hexrep(self.hash, delimit=False)
file_path = directory_path+"/"+file_name
tmp_path = file_path+".tmp."+str(os.getpid())
tmp_path = file_path+".tmp."+str(os.getpid() or time.time())
try:
with open(tmp_path, "wb") as file: