Reduce use of non-debug pprint

main2
Bob Mottram 2019-10-29 20:23:49 +00:00
parent e585424814
commit c1da8ffe8f
5 changed files with 11 additions and 11 deletions

View File

@ -583,7 +583,7 @@ class PubServer(BaseHTTPRequestHandler):
# For like activities add a 'to' field, which is a copy of the actor within the object field
messageJson,toFieldExists=addToField('Like',messageJson,self.server.debug)
pprint(messageJson)
#pprint(messageJson)
# save the json for later queue processing
queueFilename = \
@ -1599,7 +1599,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion).encode('utf-8')
self._set_headers('text/html',len(msg),cookie)
print('----------------------------------------------------')
pprint(repliesJson)
#pprint(repliesJson)
self._write(msg)
else:
if self._fetchAuthenticated():

View File

@ -225,7 +225,8 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \
return None
postDomain,postPort=getDomainFromActor(postJsonObject['actor'])
if not postDomain:
pprint(postJsonObject)
if debug:
pprint(postJsonObject)
print('No post Domain in actor')
return None
if isBlocked(baseDir,nickname,domain,postNickname,postDomain):

View File

@ -13,7 +13,6 @@ import os
import fileinput
import subprocess
import shutil
from pprint import pprint
from pathlib import Path
from Crypto.PublicKey import RSA
from shutil import copyfile

View File

@ -2475,7 +2475,7 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str,nickname: str,domain:
if not announcedJson.get('id'):
rejectAnnounce(announceFilename)
pprint(announcedJson)
#pprint(announcedJson)
return None
if '/statuses/' not in announcedJson['id']:
rejectAnnounce(announceFilename)
@ -2487,11 +2487,11 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str,nickname: str,domain:
return None
if not announcedJson.get('type'):
rejectAnnounce(announceFilename)
pprint(announcedJson)
#pprint(announcedJson)
return None
if announcedJson['type']!='Note':
rejectAnnounce(announceFilename)
pprint(announcedJson)
#pprint(announcedJson)
return None
# wrap in create to be consistent with other posts
@ -2501,7 +2501,7 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str,nickname: str,domain:
announcedJson)
if announcedJson['type']!='Create':
rejectAnnounce(announceFilename)
pprint(announcedJson)
#pprint(announcedJson)
return None
# set the id to the original status

View File

@ -1785,13 +1785,13 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
titleStr+='<a href="'+messageId+'">'+displayName+'</a>'
else:
if not messageId:
pprint(postJsonObject)
#pprint(postJsonObject)
print('ERROR: no messageId')
if not actorNickname:
pprint(postJsonObject)
#pprint(postJsonObject)
print('ERROR: no actorNickname')
if not actorDomain:
pprint(postJsonObject)
#pprint(postJsonObject)
print('ERROR: no actorDomain')
titleStr+='<a href="'+messageId+'">@'+actorNickname+'@'+actorDomain+'</a>'