diff --git a/daemon.py b/daemon.py index 198de8947..a004afff3 100644 --- a/daemon.py +++ b/daemon.py @@ -951,7 +951,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.translate, \ nickname,self.server.domain, \ postJsonObject) - if msg: + if msg!=None: + print("Test sending blog post") msg=msg.encode() self._set_headers('text/html',len(msg),cookie) self._write(msg) diff --git a/webinterface.py b/webinterface.py index 438dd9dbe..1194a699c 100644 --- a/webinterface.py +++ b/webinterface.py @@ -5011,23 +5011,17 @@ def htmlBlogPost(baseDir: str,httpPrefix: str,translate: {}, \ cssFilename=baseDir+'/epicyon-blog.css' if os.path.isfile(baseDir+'/blog.css'): cssFilename=baseDir+'/blog.css' - print("Test cssFilename="+cssFilename) with open(cssFilename, 'r') as cssFile: - print("Test cssFilename loaded 1") blogCSS=cssFile.read() - print("Test cssFilename loaded 2") blogStr=htmlHeader(cssFilename,blogCSS) - print("Test cssFilename loaded 3 "+blogStr) if postJsonObject['object'].get('summary'): blogStr+='

'+postJsonObject['object']['summary']+'

\n' - print("Test cssFilename loaded 4 "+blogStr) if postJsonObject['object'].get('published'): if 'T' in postJsonObject['object']['published']: blogStr+='

'+postJsonObject['object']['published'].split('T')[0]+'

\n' - print("Test cssFilename loaded 5 "+blogStr) if postJsonObject['object'].get('content'): contentStr=addEmbeddedElements(translate,postJsonObject['object']['content']) if postJsonObject['object'].get('tag'): @@ -5036,12 +5030,10 @@ def htmlBlogPost(baseDir: str,httpPrefix: str,translate: {}, \ postJsonObject['object']['tag'],'content') blogStr+=contentStr+'\n' - print("Test cssFilename loaded 6 "+blogStr) blogStr+='
\n' blogStr+= \ '

'+translate['About the author']+'

\n' - print("Test blogStr="+blogStr) return blogStr+htmlFooter() return None