forked from indymedia/epicyon
Handle no returned value
parent
c74e865915
commit
600b468409
2
inbox.py
2
inbox.py
|
@ -276,6 +276,8 @@ def inboxCheckCapabilities(baseDir :str,nickname :str,domain :str, \
|
|||
getOcapFilename(baseDir, \
|
||||
queueJson['nickname'],queueJson['domain'], \
|
||||
actor,'accept')
|
||||
if not ocapFilename:
|
||||
return False
|
||||
if not os.path.isfile(ocapFilename):
|
||||
if debug:
|
||||
print('DEBUG: capabilities for '+ \
|
||||
|
|
11
posts.py
11
posts.py
|
@ -487,11 +487,12 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
|||
capabilityId=None
|
||||
capabilityIdList=[]
|
||||
ocapFilename=getOcapFilename(baseDir,nickname,domain,toUrl,'granted')
|
||||
if os.path.isfile(ocapFilename):
|
||||
with open(ocapFilename, 'r') as fp:
|
||||
oc=commentjson.load(fp)
|
||||
if oc.get('id'):
|
||||
capabilityIdList=[oc['id']]
|
||||
if ocapFilename:
|
||||
if os.path.isfile(ocapFilename):
|
||||
with open(ocapFilename, 'r') as fp:
|
||||
oc=commentjson.load(fp)
|
||||
if oc.get('id'):
|
||||
capabilityIdList=[oc['id']]
|
||||
|
||||
newPost = {
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
|
|
Loading…
Reference in New Issue