mirror of https://gitlab.com/bashrc2/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, \
|
getOcapFilename(baseDir, \
|
||||||
queueJson['nickname'],queueJson['domain'], \
|
queueJson['nickname'],queueJson['domain'], \
|
||||||
actor,'accept')
|
actor,'accept')
|
||||||
|
if not ocapFilename:
|
||||||
|
return False
|
||||||
if not os.path.isfile(ocapFilename):
|
if not os.path.isfile(ocapFilename):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: capabilities for '+ \
|
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
|
capabilityId=None
|
||||||
capabilityIdList=[]
|
capabilityIdList=[]
|
||||||
ocapFilename=getOcapFilename(baseDir,nickname,domain,toUrl,'granted')
|
ocapFilename=getOcapFilename(baseDir,nickname,domain,toUrl,'granted')
|
||||||
if os.path.isfile(ocapFilename):
|
if ocapFilename:
|
||||||
with open(ocapFilename, 'r') as fp:
|
if os.path.isfile(ocapFilename):
|
||||||
oc=commentjson.load(fp)
|
with open(ocapFilename, 'r') as fp:
|
||||||
if oc.get('id'):
|
oc=commentjson.load(fp)
|
||||||
capabilityIdList=[oc['id']]
|
if oc.get('id'):
|
||||||
|
capabilityIdList=[oc['id']]
|
||||||
|
|
||||||
newPost = {
|
newPost = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
|
|
Loading…
Reference in New Issue