]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Fix unnassigned variable issue if one profile is detected
authorPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 13 Apr 2020 11:29:50 +0000 (13:29 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 13 Apr 2020 11:29:50 +0000 (13:29 +0200)
Fixes #190.

autorandr.py

index c8765607bedc0b401a7cb231a731d463eb92fea2..6afeee08417ef96e18eacada7f8b7467d26a41e6 100755 (executable)
@@ -1368,6 +1368,7 @@ def main(argv):
             props = []
             if profile_name in detected_profiles:
                 if len(detected_profiles) == 1:
+                    index = 1
                     props.append("(detected)")
                 else:
                     index = detected_profiles.index(profile_name) + 1