[gnome-code-assistance/wip/arch] [backends/c] Open files in binary mode



commit 7a65b35513e0dffd848476831744db9913305770
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Mon Nov 11 11:43:49 2013 +0100

    [backends/c] Open files in binary mode

 backends/c/__init__.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/backends/c/__init__.py b/backends/c/__init__.py
index 96b5812..a158f72 100644
--- a/backends/c/__init__.py
+++ b/backends/c/__init__.py
@@ -63,13 +63,13 @@ class Service(transport.Service, transport.Project):
 
         for d in docs:
             if d.data_path != d.path:
-                unsaved.append((d.path, open(d.data_path)))
+                unsaved.append((d.path, open(d.data_path, 'rb')))
 
         return [self._parse(doc, unsaved, options)]
 
     def parse(self, doc, options):
         if doc.data_path != doc.path:
-            unsaved = [(doc.path, open(doc.data_path))]
+            unsaved = [(doc.path, open(doc.data_path, 'rb'))]
         else:
             unsaved = []
 


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