From: Michael Tremer Date: Tue, 7 Mar 2023 17:35:22 +0000 (+0000) Subject: uploads: Don't put uploads into a subdirectory X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3cf4cadbe7d92667b932024639529c56103dc8ad;p=pbs.git uploads: Don't put uploads into a subdirectory This is probably slightly easier because we do not have to create about creating a subdirectory and permissions of that directory. Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/uploads.py b/src/buildservice/uploads.py index 7048a6e5..08e84e13 100644 --- a/src/buildservice/uploads.py +++ b/src/buildservice/uploads.py @@ -54,13 +54,7 @@ class Uploads(base.Object): """ Returns a file handle which can be used to write temporary data to. """ - path = self.backend.path("tmp", "uploads") - - # Make sure path exists - try: - os.makedirs(path) - except FileExistsError: - pass + path = self.backend.path("tmp") return tempfile.NamedTemporaryFile(dir=path, delete=False)