[pygobject/pygobject-2-28] dsextras.py: ensure eol characters are preserved when writing template files (so \n does not become



commit 27496e0e86e7d8798caf019fd09af5c6a30ec633
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Tue Mar 22 20:47:51 2011 +0100

    dsextras.py: ensure eol characters are preserved when writing template files (so \n does not become \r\n)

 dsextras.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/dsextras.py b/dsextras.py
index 6f8316d..b2c9e90 100644
--- a/dsextras.py
+++ b/dsextras.py
@@ -271,7 +271,7 @@ class InstallData(install_data):
 
         output = os.path.join(install_dir, output_file)
         self.mkpath(install_dir)
-        open(output, 'w').write(template)
+        open(output, 'wb').write(template)
         self.local_inputs.append(filename)
         self.local_outputs.append(output)
         return output



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