[meld] recent: Remove support for reading recent-comparison files with paths



commit a4f409f2c76ee03170e7c34d2117c546ebf9e908
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Tue Dec 11 07:11:56 2018 +1000

    recent: Remove support for reading recent-comparison files with paths
    
    We migrated a couple of releases back, so this is not unreasonable.

 meld/recent.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/meld/recent.py b/meld/recent.py
index efc21908..ad8bfc80 100644
--- a/meld/recent.py
+++ b/meld/recent.py
@@ -124,14 +124,12 @@ class RecentFiles:
         if not comp_gfile.query_exists(None) or not comp_path:
             raise IOError("Recent comparison file does not exist")
 
-        # TODO: remove reading paths in next release
         try:
             config = configparser.RawConfigParser()
             config.read(comp_path)
             assert (config.has_section("Comparison") and
                     config.has_option("Comparison", "type") and
-                    (config.has_option("Comparison", "paths") or
-                     config.has_option("Comparison", "uris")))
+                    config.has_option("Comparison", "uris"))
         except (configparser.Error, AssertionError):
             raise ValueError("Invalid recent comparison file")
 
@@ -140,12 +138,8 @@ class RecentFiles:
         except ValueError:
             raise ValueError("Invalid recent comparison file")
 
-        if config.has_option("Comparison", "uris"):
-            uris = config.get("Comparison", "uris").split(";")
-            gfiles = [Gio.File.new_for_uri(u) for u in uris]
-        else:
-            paths = config.get("Comparison", "paths").split(";")
-            gfiles = [Gio.File.new_for_path(p) for p in paths]
+        uris = config.get("Comparison", "uris").split(";")
+        gfiles = [Gio.File.new_for_uri(u) for u in uris]
 
         return recent_type, gfiles
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]