forked from indymedia/epicyon
Handle no returned value
This commit is contained in:
1 parent
c74e865915
commit
600b468409
2 files changed
+8
-5
No files matched your search
@@ -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 '+ \
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user