From ad2ff6cf05936fe82af9dc02a1e11d721956f9b7 Mon Sep 17 00:00:00 2001 From: gutosie Date: Sat, 22 Nov 2025 21:35:49 +0200 Subject: [PATCH] Add files via upload --- NeoBoot/files/Task.py | 14 ++++++++++---- NeoBoot/files/stbbranding.py | 3 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/NeoBoot/files/Task.py b/NeoBoot/files/Task.py index 9488e8d..c2a04ca 100644 --- a/NeoBoot/files/Task.py +++ b/NeoBoot/files/Task.py @@ -118,9 +118,12 @@ class Job(object): self.abort() def __str__(self): - return "Components.Task.Job name=%s #tasks=%s" % ( - self.name, len(self.tasks)) - + try: + return "Components.Task.Job name=%s #tasks=%s" % ( + self.name, len(self.tasks)) + except Exception as ex: + return 'Components.Task.Job name=%s #tasks=%s' % ( + self.name, len(self.tasks)) class Task(object): @@ -283,7 +286,10 @@ class Task(object): progress = property(getProgress, setProgress) def __str__(self): - return "Components.Task.Task name=%s" % self.name + try: + return "Components.Task.Task name=%s" % self.name + except Exception as ex: + return 'Components.Task.Task name=%s' % self.name class LoggingTask(Task): diff --git a/NeoBoot/files/stbbranding.py b/NeoBoot/files/stbbranding.py index 228420e..8e170b7 100644 --- a/NeoBoot/files/stbbranding.py +++ b/NeoBoot/files/stbbranding.py @@ -576,14 +576,13 @@ def getVuModel(): procmodel = f.readline().strip() f.close() model = procmodel.title().replace("olose", "olo SE").replace( - "olo2se", "olo2 SE").replace("2", "²") + "olo2se", "olo2 SE").replace("2", "²") return model except Exception: pass return "unknown" - def getBoxHostName(): try: if os.path.exists("/etc/hostname"):