~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a stack method for determining whether a branch is initialised
[stgit]
/
stgit
/
commands
/
mail.py
diff --git
a/stgit/commands/mail.py
b/stgit/commands/mail.py
index
6a7d5d2
..
7cc18bc
100644
(file)
--- a/
stgit/commands/mail.py
+++ b/
stgit/commands/mail.py
@@
-124,18
+124,18
@@
def __get_maintainer():
else:
return None
else:
return None
-def __parse_addresses(
string
):
+def __parse_addresses(
addresses
):
"""Return a two elements tuple: (from, [to])
"""
"""Return a two elements tuple: (from, [to])
"""
- def __addr_list(
string
):
- m = re.search('[^@\s<,]+@[^>\s,]+',
string
);
+ def __addr_list(
addrs
):
+ m = re.search('[^@\s<,]+@[^>\s,]+',
addrs
);
if (m == None):
return []
if (m == None):
return []
- return [ m.group() ] + __addr_list(
string
[m.end():])
+ return [ m.group() ] + __addr_list(
addrs
[m.end():])
from_addr_list = []
to_addr_list = []
from_addr_list = []
to_addr_list = []
- for line in
string
.split('\n'):
+ for line in
addresses
.split('\n'):
if re.match('from:\s+', line, re.I):
from_addr_list += __addr_list(line)
elif re.match('(to|cc|bcc):\s+', line, re.I):
if re.match('from:\s+', line, re.I):
from_addr_list += __addr_list(line)
elif re.match('(to|cc|bcc):\s+', line, re.I):