diff mercurial/templatefilters.py @ 9136:31177742f54a

for calls expecting bool args, pass bool instead of int str.splitlines and email.message.as_string both expect a bool argument defaulting at False: replace f(1) by f(True) and f(0) by f()
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Mon, 13 Jul 2009 09:50:26 +0900
parents 0001e49f1c11
children 20ed9909dbd9
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Tue Jul 14 20:24:16 2009 +0200
+++ b/mercurial/templatefilters.py	Mon Jul 13 09:50:26 2009 +0900
@@ -73,7 +73,7 @@
 def firstline(text):
     '''return the first line of text'''
     try:
-        return text.splitlines(1)[0].rstrip('\r\n')
+        return text.splitlines(True)[0].rstrip('\r\n')
     except IndexError:
         return ''