From f06cd2d17cc81b077f494d56b8515ebea38770f7 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Wed, 21 Feb 2007 18:30:30 +0000 Subject: [PATCH] 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 --- stgit/commands/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.11.0