Avoid including None

master
Bob Mottram 2019-08-19 11:52:38 +01:00
parent 9f06738447
commit c400c029ac
1 changed files with 2 additions and 1 deletions

View File

@ -461,13 +461,14 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
summary=subject summary=subject
sensitive=True sensitive=True
toRecipients=[]
if toUrl: if toUrl:
if not isinstance(toUrl, str): if not isinstance(toUrl, str):
print('ERROR: toUrl is not a string') print('ERROR: toUrl is not a string')
return None return None
toRecipients=[toUrl]
# who to send to # who to send to
toRecipients=[toUrl]
for mention in mentionedRecipients: for mention in mentionedRecipients:
if mention not in toRecipients: if mention not in toRecipients:
toRecipients.append(mention) toRecipients.append(mention)