From: Felix Domke Date: Tue, 2 May 2006 16:58:16 +0000 (+0000) Subject: don't crash if time is *really* invalid X-Git-Tag: 2.6.0~3511 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/ebd1552cdd3e60d5eb21f97e46570de2e17ed19f?hp=02d30e2d4b03a699bd5ba10ac149f96a6934cab1 don't crash if time is *really* invalid --- diff --git a/lib/python/Components/ServicePosition.py b/lib/python/Components/ServicePosition.py index cb444921..ba87e3ef 100644 --- a/lib/python/Components/ServicePosition.py +++ b/lib/python/Components/ServicePosition.py @@ -65,8 +65,11 @@ class ServicePosition(PerServiceDisplay): l = self.get(self.TYPE_POSITION) if l != -1: l += self.relative_base - t = time.localtime(l) - timestr = "%2d:%02d:%02d" % (t.tm_hour, t.tm_min, t.tm_sec) + try: + t = time.localtime(l) + timestr = "%2d:%02d:%02d" % (t.tm_hour, t.tm_min, t.tm_sec) + except ValueError: + timestr = "" else: timestr = ""