From bc3c19fd9c268c51b437272d224b3ae516493672 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 18 Aug 2019 22:15:09 +0100 Subject: [PATCH] Check for no address --- posts.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/posts.py b/posts.py index 3b0fdf7b..443e91b4 100644 --- a/posts.py +++ b/posts.py @@ -1342,6 +1342,8 @@ def sendToNamedAddresses(session,baseDir: str, \ if debug: print('recipientsObject: '+str(recipientsObject[rType])) for address in recipientsObject[rType]: + if not address: + continue if '/' not in address: continue if address.endswith('#Public'): @@ -1351,11 +1353,13 @@ def sendToNamedAddresses(session,baseDir: str, \ recipients.append(address) elif isinstance(recipientsObject[rType], str): address=recipientsObject[rType] - if address.endswith('#Public'): - continue - if address.endswith('/followers'): - continue - recipients.append(address) + if address: + if '/' in address: + if address.endswith('#Public'): + continue + if address.endswith('/followers'): + continue + recipients.append(address) if not recipients: if debug: print('DEBUG: no individual recipients')