Browse Source

[python] don't add newlines to an empty buffer

Dan Korostelev 10 years ago
parent
commit
68298d236d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      genpy.ml

+ 1 - 1
genpy.ml

@@ -1772,7 +1772,7 @@ module Generator = struct
 		end)
 
 	let newline ctx =
-		spr ctx "\n"
+		if not (Buffer.length ctx.buf = 0) then spr ctx "\n"
 
 
 	(* Generating functions *)