[meld] For python3 shutil.copyfileobj expects binary file (bgo#772425)



commit 86901ed8d5077b509c38f2718ff6a99d4f8808e0
Author: Vasily Galkin <galkin-vv yandex ru>
Date:   Tue Oct 4 21:17:25 2016 +0300

    For python3 shutil.copyfileobj expects binary file (bgo#772425)

 meld/vc/_null.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/vc/_null.py b/meld/vc/_null.py
index b52b9aa..a94dd9d 100644
--- a/meld/vc/_null.py
+++ b/meld/vc/_null.py
@@ -43,6 +43,6 @@ class Vc(_vc.Vc):
 
     def get_path_for_repo_file(self, path, commit=None):
         with tempfile.NamedTemporaryFile(prefix='meld-tmp', delete=False) as f:
-            with open(path, 'r') as vc_file:
+            with open(path, 'rb') as vc_file:
                 shutil.copyfileobj(vc_file, f)
         return f.name


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