]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Add patch for missing config section in settings.ini from upstream debian/1.3-2
authorDon Armstrong <don@donarmstrong.com>
Thu, 21 Dec 2017 17:09:49 +0000 (09:09 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 21 Dec 2017 17:09:49 +0000 (09:09 -0800)
debian/changelog
debian/patches/settings_ini

index b9a86604bb10a61b5933aab7a225873a494a238a..e42a1c954d0ed2c8b594401a998c66177b45398c 100644 (file)
@@ -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 <don@debian.org>  Thu, 21 Dec 2017 09:09:25 -0800
+
 autorandr (1.3-1) unstable; urgency=medium
 
   * New upstream release
index 65f6891b9a09502a3189dff16f485da29ee5c77b..22279623b171dc3e948416c47db72000b193d9f3 100644 (file)
@@ -45,7 +45,7 @@
      return configuration
  
  
-@@ -1002,6 +1013,14 @@
+@@ -1002,6 +1013,15 @@
              X11_displays_done.add(display)
  
  
 +    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))