damned-lies r768 - trunk



Author: danilo
Date: Fri Feb 29 20:06:05 2008
New Revision: 768
URL: http://svn.gnome.org/viewvc/damned-lies?rev=768&view=rev

Log:
Fix crach with empty contents in potdiff.py.

Modified:
   trunk/ChangeLog
   trunk/potdiff.py

Modified: trunk/potdiff.py
==============================================================================
--- trunk/potdiff.py	(original)
+++ trunk/potdiff.py	Fri Feb 29 20:06:05 2008
@@ -54,7 +54,7 @@
 
          [msgctxt::]msgid[/msgid_plural]"""
 
-    if contents[-1] != "\n": contents += "\n"
+    if len(contents) and contents[-1] != "\n": contents += "\n"
 
     # state machine for parsing PO files
     msgid = ""; msgstr = ""; msgctxt = ""; comment = ""; plural = ""; 



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