commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r7216 - trunk/gnue-common/src/apps


From: btami
Subject: [gnue] r7216 - trunk/gnue-common/src/apps
Date: Thu, 17 Mar 2005 15:32:06 -0600 (CST)

Author: btami
Date: 2005-03-17 15:32:05 -0600 (Thu, 17 Mar 2005)
New Revision: 7216

Modified:
   trunk/gnue-common/src/apps/GDebug.py
Log:
fix for empty debug messages (lines=[])

Modified: trunk/gnue-common/src/apps/GDebug.py
===================================================================
--- trunk/gnue-common/src/apps/GDebug.py        2005-03-17 21:30:18 UTC (rev 
7215)
+++ trunk/gnue-common/src/apps/GDebug.py        2005-03-17 21:32:05 UTC (rev 
7216)
@@ -68,9 +68,9 @@
     self.filehandle = filehandle
 
   def write (self, str):
-    lines = string.split (str, "\n")
-    while lines [-1] == "":             # remove empty lines at the end
-      del (lines [-1])
+    lines = string.split (str, "\n")
+    while len(lines) and lines [-1] == "":             # remove empty lines at 
the end
+      del (lines [-1])
     self.filehandle.write (string.join (["DB000: " + s for s in lines], "\n"))
     self.filehandle.write ("\n")
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]