From 6b07b1f2f8b3c89b4adde4805e724addfdde91b8 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 21 Dec 2017 09:09:49 -0800 Subject: [PATCH] Add patch for missing config section in settings.ini from upstream --- debian/changelog | 7 +++++++ debian/patches/settings_ini | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index b9a8660..e42a1c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +autorandr (1.3-2) unstable; urgency=medium + + * Add in support for missing config section in settings.ini from + upstream @e717470ee. (Closes: #884855) + + -- Don Armstrong Thu, 21 Dec 2017 09:09:25 -0800 + autorandr (1.3-1) unstable; urgency=medium * New upstream release 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)) -- 2.39.2