From: Phillip Berndt <phillip.berndt@googlemail.com>
Date: Mon, 13 Apr 2020 11:29:50 +0000 (+0200)
Subject: Fix unnassigned variable issue if one profile is detected
X-Git-Tag: 1.10~4
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=db90c119afdc8d27c3b269ad4452e831753db4aa;p=deb_pkgs%2Fautorandr.git

Fix unnassigned variable issue if one profile is detected

Fixes #190.
---

diff --git a/autorandr.py b/autorandr.py
index c876560..6afeee0 100755
--- a/autorandr.py
+++ b/autorandr.py
@@ -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