]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Improve error message if a profile configures an output that doesn't exist (See ...
authorPhillip Berndt <phillip.berndt@googlemail.com>
Sun, 10 Mar 2019 12:57:32 +0000 (13:57 +0100)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Sun, 10 Mar 2019 12:59:43 +0000 (13:59 +0100)
autorandr.py

index c108c2615e369ac27b751a3e15e5224a8deaf382..04fda8fa66e60fd4b44741f77cd5c3dcaf897d4c 100755 (executable)
@@ -708,6 +708,9 @@ def apply_configuration(new_configuration, current_configuration, dry_run=False)
         if not new_configuration[output].edid or "off" in new_configuration[output].options:
             disable_outputs.append(new_configuration[output].option_vector)
         else:
+            if output not in current_configuration:
+                raise AutorandrException("New profile configures output %s which does not exist in current xrandr --verbose output. "
+                                         "Don't know how to proceed." % output)
             if "off" not in current_configuration[output].options:
                 remain_active_count += 1