]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Don't fail to make log URL if we don't have a path
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Feb 2025 17:56:13 +0000 (17:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Feb 2025 17:56:13 +0000 (17:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index bab665647a616f7d7ae36fe81a51c3f46f5db7c1..23031fc1094b281aa92baca3343e2bfdaf34656f 100644 (file)
@@ -957,9 +957,10 @@ class Job(database.Base, database.BackendMixin, database.SoftDeleteMixin):
                """
                        Creates the URL to the log file without the compression extension.
                """
-               log_path, extension = os.path.splitext(self.log_path)
+               if self.log_path:
+                       log_path, extension = os.path.splitext(self.log_path)
 
-               return self.backend.path_to_url(log_path)
+                       return self.backend.path_to_url(log_path)
 
        # Log Path