]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
remove duplication
authorChristoph Gysin <christoph.gysin@gmail.com>
Mon, 13 Nov 2017 14:49:04 +0000 (16:49 +0200)
committerChristoph Gysin <christoph.gysin@gmail.com>
Mon, 13 Nov 2017 17:30:01 +0000 (19:30 +0200)
autorandr.py

index e5ab42fdd0308695e720b6ada0415ccdd8751c0e..756e76df36d69a70bd29cc6a03b318d75ac11790 100755 (executable)
@@ -802,11 +802,9 @@ def exec_scripts(profile_path, script_name, meta_information=None):
     Returns True unless any of the scripts exited with non-zero exit status.
     """
     all_ok = True
+    env = os.environ.copy()
     if meta_information:
-        env = os.environ.copy()
         env.update({"AUTORANDR_%s" % str(key).upper(): str(value) for (key, value) in meta_information.items()})
-    else:
-        env = os.environ.copy()
 
     # If there are multiple candidates, the XDG spec tells to only use the first one.
     ran_scripts = set()