Compare commits

...
6 Commits
4 changed files with 14 additions and 7 deletions

No files matched your search

+11 -4
View File
@@ -668,19 +668,26 @@ class LXMessage:
return msgpack.packb(container)
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() or time.time())
try:
file = open(file_path, "wb")
file.write(self.packed_container())
file.close()
with open(tmp_path, "wb") as file:
file.write(self.packed_container())
file.flush()
try: os.fsync(file.fileno())
except OSError: pass
os.replace(tmp_path, file_path)
return file_path
except Exception as e:
try:
if os.path.exists(tmp_path): os.unlink(tmp_path)
except Exception: pass
RNS.log("Error while writing LXMF message to file \""+str(file_path)+"\". The contained exception was: "+str(e), RNS.LOG_ERROR)
return None
+1 -1
View File
@@ -1 +1 @@
__version__ = "0.9.8"
__version__ = "0.9.9"
+1 -1
View File
@@ -23,7 +23,7 @@ build_sdist:
build_spkg: remove_symlinks build_sdist create_symlinks
release: remove_symlinks build_wheel create_symlinks
release: remove_symlinks build_wheel build_spkg create_symlinks
upload:
@echo Uploading to PyPi...
+1 -1
View File
@@ -26,6 +26,6 @@ setuptools.setup(
'lxmd=LXMF.Utilities.lxmd:main',
]
},
install_requires=["rns>=1.2.5"],
install_requires=["rns>=1.3.0"],
python_requires=">=3.7",
)