From 804f9f172faf53b0f63b5bed67068a071ad01a13 Mon Sep 17 00:00:00 2001 From: seahawk1986 Date: Mon, 3 Sep 2018 11:11:48 +0200 Subject: [PATCH] create empty result if no data have been found --- library/xrandr_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/xrandr_facts.py b/library/xrandr_facts.py index 735d8a9..d793579 100755 --- a/library/xrandr_facts.py +++ b/library/xrandr_facts.py @@ -219,6 +219,7 @@ def collect_nvidia_data(): def output_data(data, write_edids=True): + result = {} if data: modes = [] for _, screen_data in data.items(): @@ -230,7 +231,6 @@ def output_data(data, write_edids=True): for refreshrate in refreshrates: modes.append(Mode(connector, resolution, refreshrate)) if modes: - result = {} try: gpu_name, bus_id = collect_nvidia_data() except ValueError: