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
sensitive=True
toRecipients=[]
if toUrl:
if not isinstance(toUrl, str):
print('ERROR: toUrl is not a string')
return None
toRecipients=[toUrl]
# who to send to
toRecipients=[toUrl]
for mention in mentionedRecipients:
if mention not in toRecipients:
toRecipients.append(mention)