From d486fb1d3182685bc5229cf008fe6c7fcb92e906 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 29 Jun 2019 16:18:35 +0100 Subject: [PATCH] Return single value --- epicyon.py | 4 ++++ person.py | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/epicyon.py b/epicyon.py index 8130624b..ffe2fc8a 100644 --- a/epicyon.py +++ b/epicyon.py @@ -33,6 +33,10 @@ https=True useTor=False session = createSession(useTor) +#asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'} +#userFollowing = getJson(session,"",asHeader,None) + + privateKeyPem,publicKeyPem,person,wfEndpoint=createPerson(username,domain,https,True) #deleteAllPosts(username,domain) setPreferredUsername(username,domain,'badger') diff --git a/person.py b/person.py index 6038a95c..31948484 100644 --- a/person.py +++ b/person.py @@ -164,16 +164,16 @@ def personOutboxJson(domain: str,path: str,https: bool,noOfItems: int) -> []: """Obtain the outbox feed for the given person """ if not path.endswith('/outbox'): - return None,None + return None username=None if path.startswith('/users/'): username=path.replace('/users/','',1).replace('/outbox','') if path.startswith('/@'): username=path.replace('/@','',1).replace('/outbox','') if not username: - return None,None + return None if not validUsername(username): - return None,None + return None startMessageId=None return createOutbox(username,domain,https,noOfItems,startMessageId)