X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=blobdiff_plain;f=debian%2Fpatches%2Fsettings_ini;h=22279623b171dc3e948416c47db72000b193d9f3;hp=65f6891b9a09502a3189dff16f485da29ee5c77b;hb=refs%2Ftags%2Fdebian%2F1.3-2;hpb=46cf3f3186b21243c65469576eea2fc8d481bb9c diff --git a/debian/patches/settings_ini b/debian/patches/settings_ini index 65f6891..2227962 100644 --- a/debian/patches/settings_ini +++ b/debian/patches/settings_ini @@ -45,7 +45,7 @@ return configuration -@@ -1002,6 +1013,14 @@ +@@ -1002,6 +1013,15 @@ X11_displays_done.add(display) @@ -54,13 +54,14 @@ + the options dictionary""" + config = configparser.ConfigParser() + config.read(os.path.join(directory, "settings.ini")) -+ for key, value in config.items("config"): -+ options.setdefault("--%s" % key, value) ++ if config.has_section("config"): ++ for key, value in config.items("config"): ++ options.setdefault("--%s" % key, value) + def main(argv): try: opts, args = getopt.getopt(argv[1:], "s:r:l:d:cfh", -@@ -1040,6 +1059,7 @@ +@@ -1040,6 +1060,7 @@ if os.path.isdir(system_profile_path): profiles.update(load_profiles(system_profile_path)) profile_symlinks.update(get_symlinks(system_profile_path)) @@ -68,7 +69,7 @@ # For the user's profiles, prefer the legacy ~/.autorandr if it already exists # profile_path is also used later on to store configurations profile_path = os.path.expanduser("~/.autorandr") -@@ -1049,6 +1069,7 @@ +@@ -1049,6 +1070,7 @@ if os.path.isdir(profile_path): profiles.update(load_profiles(profile_path)) profile_symlinks.update(get_symlinks(profile_path))