From: Catalin Marinas Date: Wed, 21 Feb 2007 18:30:30 +0000 (+0000) Subject: Fix the alias check in the mail --bcc command X-Git-Tag: v0.14.3~329 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/f06cd2d17cc81b077f494d56b8515ebea38770f7 Fix the alias check in the mail --bcc command A check for an empty alias was performed if autobcc wasn't set in the config file. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/common.py b/stgit/commands/common.py index 432edce..0d99992 100644 --- a/stgit/commands/common.py +++ b/stgit/commands/common.py @@ -308,6 +308,8 @@ def address_or_alias(addr_str): the aliases in the config files. """ def __address_or_alias(addr): + if not addr: + return None if addr.find('@') >= 0: # it's an e-mail address return addr @@ -315,12 +317,11 @@ def address_or_alias(addr_str): if alias: # it's an alias return alias - raise CmdException, 'unknown e-mail alias: %s' % addr addr_list = [__address_or_alias(addr.strip()) for addr in addr_str.split(',')] - return ', '.join(addr_list) + return ', '.join([addr for addr in addr_list if addr]) def patch_name_from_msg(msg): """Return a string to be used as a patch name. This is generated