Check for no address

master
Bob Mottram 2019-08-18 22:15:09 +01:00
parent 494ef3f952
commit bc3c19fd9c
1 changed files with 9 additions and 5 deletions

View File

@ -1342,6 +1342,8 @@ def sendToNamedAddresses(session,baseDir: str, \
if debug: if debug:
print('recipientsObject: '+str(recipientsObject[rType])) print('recipientsObject: '+str(recipientsObject[rType]))
for address in recipientsObject[rType]: for address in recipientsObject[rType]:
if not address:
continue
if '/' not in address: if '/' not in address:
continue continue
if address.endswith('#Public'): if address.endswith('#Public'):
@ -1351,11 +1353,13 @@ def sendToNamedAddresses(session,baseDir: str, \
recipients.append(address) recipients.append(address)
elif isinstance(recipientsObject[rType], str): elif isinstance(recipientsObject[rType], str):
address=recipientsObject[rType] address=recipientsObject[rType]
if address.endswith('#Public'): if address:
continue if '/' in address:
if address.endswith('/followers'): if address.endswith('#Public'):
continue continue
recipients.append(address) if address.endswith('/followers'):
continue
recipients.append(address)
if not recipients: if not recipients:
if debug: if debug:
print('DEBUG: no individual recipients') print('DEBUG: no individual recipients')