From 88ed4d22f00a1ee55a42b2421641cdaf380e3c54 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 9 Dec 2021 10:44:58 +0100 Subject: [PATCH] i3pystatus/ice-status.py: fix error when seconds is None As recommended by vonbirne in https://git.franzi.business/kunsi/dotfiles/pulls/2 --- .config/i3pystatus/ice-status.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/i3pystatus/ice-status.py b/.config/i3pystatus/ice-status.py index 8e77810..c1a79ca 100755 --- a/.config/i3pystatus/ice-status.py +++ b/.config/i3pystatus/ice-status.py @@ -8,6 +8,8 @@ from sys import exit # bundlewrap.utils.text.format_duration, but trimmed down def format_time(seconds): + if seconds is None: + return "?" components = [] if seconds >= 3600: hours = int(seconds / 3600)