grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Replace print statement with sys.stdout.write for python3 compatibility
@ 2013-12-04  1:14 Mike Gilbert
  2013-12-04 10:12 ` Colin Watson
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Gilbert @ 2013-12-04  1:14 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 52 bytes --]

Gmail likes to mangle patches, so I'm attaching it.

[-- Attachment #2: gentpl-python3.patch --]
[-- Type: text/x-patch, Size: 1158 bytes --]

From 1ac0d1f8feda7cbbe3e706074aebcc805e4f3667 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Tue, 3 Dec 2013 20:06:07 -0500
Subject: [PATCH] Replace print statement with sys.stdout.write for python3
 compatibility

---
 ChangeLog | 5 +++++
 gentpl.py | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 33206cd..5e1a088 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-04  Mike Gilbert  <floppym@gentoo.org>
+
+	* gentpl.py: Replace print statement with sys.stdout.write for
+	python3 compatibility.
+
 2013-12-03  Colin Watson  <cjwatson@ubuntu.com>
 
 	* grub-core/Makefile.core.def (setjmp): Distribute
diff --git a/gentpl.py b/gentpl.py
index 1d4583c..9960c2d 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -19,6 +19,7 @@ __metaclass__ = type
 
 from optparse import OptionParser
 import re
+import sys
 
 #
 # This is the python script used to generate Makefile.*.am
@@ -434,7 +435,7 @@ def output(s, section=''):
 
 def write_output(section=''):
     for s in outputs.get(section, []):
-        print s,
+        sys.stdout.write(s)
 
 #
 # Global variables
-- 
1.8.4.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-05 16:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-04  1:14 [PATCH] Replace print statement with sys.stdout.write for python3 compatibility Mike Gilbert
2013-12-04 10:12 ` Colin Watson
2013-12-04 15:28   ` Mike Gilbert
2013-12-05 15:31     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-05 16:07       ` Colin Watson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).