fixed wiki for missing body

This commit is contained in:
mdipierro
2012-10-04 10:44:35 -05:00
parent 54a1005af3
commit 4f4a0318aa
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-10-04 08:44:15) dev
Version 2.0.9 (2012-10-04 10:44:23) dev
+2 -2
View File
@@ -4703,14 +4703,14 @@ class Wiki(object):
def first_paragraph(self,page):
if not self.can_read(page):
mm = page.body.replace('\r','')
mm = (page.body or '').replace('\r','')
ps = [p for p in mm.split('\n\n') \
if not p.startswith('#') and p.strip()]
if ps: return ps[0]
return ''
def fix_hostname(self,body):
return body.replace('://HOSTNAME','://%s' % self.host)
return (body or '').replace('://HOSTNAME','://%s' % self.host)
def read(self,slug):
if slug in '_cloud':