From: Daniel Hahler Date: Mon, 20 Nov 2017 04:22:57 +0000 (+0100) Subject: dispatch_call_to_sessions: skip envs without name X-Git-Tag: 1.3~1^2 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=e853c01c118e089b3b10670bec0174834289e809 dispatch_call_to_sessions: skip envs without name Fixes https://github.com/phillipberndt/autorandr/issues/87. --- 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