[meld] recent: Our URIs only come from one call, and they'll always be strings



commit d42aa467ab9db90537e5a61404286d1fd5bb2d93
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jun 3 08:50:23 2018 +1000

    recent: Our URIs only come from one call, and they'll always be strings

 meld/recent.py | 9 ---------
 1 file changed, 9 deletions(-)
---
diff --git a/meld/recent.py b/meld/recent.py
index 3b396de1..336b8a01 100644
--- a/meld/recent.py
+++ b/meld/recent.py
@@ -45,14 +45,6 @@ class RecentType(enum.Enum):
     Merge = "Merge"
 
 
-def unicodeify(s):
-    if s is None:
-        return None
-    if isinstance(s, bytes):
-        return s.decode(sys.getfilesystemencoding(), 'replace')
-    return s
-
-
 class RecentFiles(object):
 
     mime_type = "application/x-meld-comparison"
@@ -96,7 +88,6 @@ class RecentFiles(object):
         # If a (type, uris) comparison is already registered, then re-add
         # the corresponding comparison file
         comparison_key = (comp_type, tuple(uris))
-        uris = [unicodeify(u) for u in uris]
         if comparison_key in self._stored_comparisons:
             gfile = Gio.File.new_for_uri(
                 self._stored_comparisons[comparison_key])


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