OSDN Git Service

[displaymanager] Fix Python errors
authorAdriaan de Groot <groot@kde.org>
Mon, 27 Sep 2021 18:29:03 +0000 (20:29 +0200)
committerAdriaan de Groot <groot@kde.org>
Mon, 27 Sep 2021 19:04:26 +0000 (21:04 +0200)
Apparently nobody ever hit the else-branch here (because
each DM has exactly one implementation -- that's what the
check is there for!) because the logging of the error
itself would raise IndexError or ValueError.

src/modules/displaymanager/main.py

index 8b63b9e..5fb2286 100644 (file)
@@ -198,7 +198,7 @@ desktop_environments = [
     DesktopEnvironment('/usr/bin/fvwm3', 'fvwm3'),
     DesktopEnvironment('/usr/bin/sway', 'sway'),
     DesktopEnvironment('/usr/bin/ukui-session', 'ukui'),
-    DesktopEnvironment('/usr/bin/cutefish-session', 'cutefish-xsession'),    
+    DesktopEnvironment('/usr/bin/cutefish-session', 'cutefish-xsession'),
 ]
 
 
@@ -923,7 +923,7 @@ def run():
             else:
                 dm_instance = None
         else:
-            libcalamares.utils.debug("{!s} has {!d} implementation classes.".format(dm).format(len(impl)))
+            libcalamares.utils.debug("{!s} has {!s} implementation classes.".format(dm, len(impl)))
 
         if dm_instance is None:
             libcalamares.utils.debug("{!s} selected but not installed".format(dm))