]> Git repositories of Lucie Scarlet - dotfiles.git/commitdiff
Fixed small bug causing a range error
authorLucie Scarlet <lucie@scarlet.moe>
Thu, 25 Jul 2024 20:10:14 +0000 (22:10 +0200)
committerLucie Scarlet <lucie@scarlet.moe>
Thu, 25 Jul 2024 20:10:14 +0000 (22:10 +0200)
i3/uptime.py

index 01ee9c8af2b056ce5d7c937ac99be8d54c33d0f0..36f1f472489377ae8e3da4423b1da855311dc38d 100644 (file)
@@ -10,7 +10,7 @@ def main() -> int:
     well_formatted: str = str(raw_formatted).split(".")[0][:-3]
     fmt = well_formatted.split(".")[0]
     daysfmt = fmt.split(" days, ")
-    if len(daysfmt) > 2:
+    if len(daysfmt) >= 2:
         f2: str = daysfmt[1]
         days: str | None = daysfmt[0]
     else: