diff --git a/outbox.py b/outbox.py index c998d1a1..2e08fa09 100644 --- a/outbox.py +++ b/outbox.py @@ -214,8 +214,10 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str, if not server.session: if debug: print('DEBUG: creating new session for c2s') - server.session = \ - createSession(useTor) + server.session = createSession(useTor) + if not server.session: + print('ERROR: Failed to create session for postMessageToOutbox') + return False if debug: print('DEBUG: sending c2s post to followers') # remove inactive threads diff --git a/posts.py b/posts.py index 94798aab..2f9b75c5 100644 --- a/posts.py +++ b/posts.py @@ -2831,6 +2831,8 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str, """ This is really just for test purposes """ session = createSession(useTor) + if not session: + return personCache = {} cachedWebfingers = {} federationList = []