[meld/Python3: 21/54] patchdialog: str/bytes



commit 800235c342cf541102fa6b681059c572848aa8ac
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Nov 14 07:06:10 2015 +1000

    patchdialog: str/bytes

 meld/patchdialog.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/patchdialog.py b/meld/patchdialog.py
index 15a05ac..134f665 100644
--- a/meld/patchdialog.py
+++ b/meld/patchdialog.py
@@ -98,7 +98,7 @@ class PatchDialog(gnomeglade.Component):
         name0, name1 = names[indices[0]], names[indices[1]]
 
         diff = difflib.unified_diff(text0, text1, name0, name1)
-        unicodeify = lambda x: x.decode('utf8') if isinstance(x, str) else x
+        unicodeify = lambda x: x.decode('utf8') if isinstance(x, bytes) else x
         diff_text = "".join(unicodeify(d) for d in diff)
         buf.set_text(diff_text)
 


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