From db90c119afdc8d27c3b269ad4452e831753db4aa Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Mon, 13 Apr 2020 13:29:50 +0200 Subject: [PATCH] Fix unnassigned variable issue if one profile is detected Fixes #190. --- autorandr.py | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.5