From e853c01c118e089b3b10670bec0174834289e809 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 20 Nov 2017 05:22:57 +0100 Subject: [PATCH] dispatch_call_to_sessions: skip envs without name Fixes https://github.com/phillipberndt/autorandr/issues/87. --- autorandr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autorandr.py b/autorandr.py index ca35ba9..abf1198 100755 --- a/autorandr.py +++ b/autorandr.py @@ -957,8 +957,8 @@ def dispatch_call_to_sessions(argv): process_environ = {} for environ_entry in open(environ_file).read().split("\0"): - if "=" in environ_entry: - name, value = environ_entry.split("=", 1) + name, sep, value = environ_entry.partition("=") + if name and sep: if name == "DISPLAY" and "." in value: value = value[:value.find(".")] process_environ[name] = value -- 2.39.2