Show More
@@ -242,12 +242,14 b' def permissions(flags):' | |||||
242 | return "-rw-r--r--" |
|
242 | return "-rw-r--r--" | |
243 |
|
243 | |||
244 | def person(author): |
|
244 | def person(author): | |
245 |
""":person: Any text. Returns the |
|
245 | """:person: Any text. Returns the name before an email address, | |
|
246 | interpreting it as per RFC 5322. | |||
|
247 | """ | |||
246 | if not '@' in author: |
|
248 | if not '@' in author: | |
247 | return author |
|
249 | return author | |
248 | f = author.find('<') |
|
250 | f = author.find('<') | |
249 | if f != -1: |
|
251 | if f != -1: | |
250 |
return author[:f]. |
|
252 | return author[:f].strip(' "').replace('\\"', '"') | |
251 | f = author.find('@') |
|
253 | f = author.find('@') | |
252 | return author[:f].replace('.', ' ') |
|
254 | return author[:f].replace('.', ' ') | |
253 |
|
255 |
General Comments 0
You need to be logged in to leave comments.
Login now