Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
upload: Drop return value of delete_local_file.
Alex Vandiver00c0558b8dbb
diff --git a/zerver/lib/upload/local.py b/zerver/lib/upload/local.pyindex fa1c61cca2e..9fead6517bd 100644--- a/zerver/lib/upload/local.py+++ b/zerver/lib/upload/local.py@@ -48,12 +48,12 @@ def read_local_file(type: Literal["avatars", "files"], path: str) -> Iterator[byyield from iter(lambda: f.read(4 * 1024 * 1024), b"")-def delete_local_file(type: Literal["avatars", "files"], path: str) -> bool:+def delete_local_file(type: Literal["avatars", "files"], path: str) -> None:file_path = os.path.join(assert_is_not_none(settings.LOCAL_UPLOADS_DIR), type, path)assert_is_local_storage_path(type, file_path)if not os.path.isfile(file_path):- return False+ returnos.remove(file_path)@@ -65,7 +65,6 @@ def delete_local_file(type: Literal["avatars", "files"], path: str) -> bool:directory = os.path.dirname(directory)except OSError:break- return Trueclass LocalUploadBackend(ZulipUploadBackend):