[meld] recent: Paths need to be tuples for hashability



commit 5367a6c270ff1304b1981c7adcdc0142908571f0
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Dec 17 07:13:04 2017 +1000

    recent: Paths need to be tuples for hashability

 meld/recent.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meld/recent.py b/meld/recent.py
index 4074c29f..7fd9c678 100644
--- a/meld/recent.py
+++ b/meld/recent.py
@@ -156,10 +156,10 @@ class RecentFiles(object):
 
         if config.has_option("Comparison", "uris"):
             uris = config.get("Comparison", "uris").split(";")
-            gfiles = [Gio.File.new_for_uri(u) for u in uris]
+            gfiles = tuple(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]
+            gfiles = tuple(Gio.File.new_for_path(p) for p in paths)
         flags = tuple()
 
         return recent_type, gfiles, flags


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