forked from indymedia/epicyon
More error handling for session creation
parent
99a4b65467
commit
8ed646aed5
|
@ -214,8 +214,10 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str,
|
||||||
if not server.session:
|
if not server.session:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: creating new session for c2s')
|
print('DEBUG: creating new session for c2s')
|
||||||
server.session = \
|
server.session = createSession(useTor)
|
||||||
createSession(useTor)
|
if not server.session:
|
||||||
|
print('ERROR: Failed to create session for postMessageToOutbox')
|
||||||
|
return False
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: sending c2s post to followers')
|
print('DEBUG: sending c2s post to followers')
|
||||||
# remove inactive threads
|
# remove inactive threads
|
||||||
|
|
2
posts.py
2
posts.py
|
@ -2831,6 +2831,8 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str,
|
||||||
""" This is really just for test purposes
|
""" This is really just for test purposes
|
||||||
"""
|
"""
|
||||||
session = createSession(useTor)
|
session = createSession(useTor)
|
||||||
|
if not session:
|
||||||
|
return
|
||||||
personCache = {}
|
personCache = {}
|
||||||
cachedWebfingers = {}
|
cachedWebfingers = {}
|
||||||
federationList = []
|
federationList = []
|
||||||
|
|
Loading…
Reference in New Issue