fix email address regexp
This commit is contained in:
parent
d9e33e50b8
commit
638de3201e
1 changed files with 4 additions and 4 deletions
|
|
@ -347,9 +347,9 @@ class BoobTracker(ReplApplication):
|
||||||
|
|
||||||
issue.body = content
|
issue.body = content
|
||||||
|
|
||||||
emails = re.findall('<(.*@.*)>', m['From'] or '')
|
m = re.search('([^< ]+@[^ >]+)', m['From'] or '')
|
||||||
if len(emails) > 0:
|
if m:
|
||||||
return emails[0]
|
return m.group(1)
|
||||||
|
|
||||||
def edit_issue(self, issue, edit=True):
|
def edit_issue(self, issue, edit=True):
|
||||||
backend = self.weboob.get_backend(issue.backend)
|
backend = self.weboob.get_backend(issue.backend)
|
||||||
|
|
@ -398,7 +398,7 @@ Regards,
|
||||||
|
|
||||||
Weboob Team
|
Weboob Team
|
||||||
""" % (issue.title, issue.id)
|
""" % (issue.title, issue.id)
|
||||||
msg = MIMEText(text)
|
msg = MIMEText(text, 'plain', 'utf-8')
|
||||||
msg['Subject'] = 'Issue #%s reported' % issue.id
|
msg['Subject'] = 'Issue #%s reported' % issue.id
|
||||||
msg['From'] = 'Weboob <weboob@weboob.org>'
|
msg['From'] = 'Weboob <weboob@weboob.org>'
|
||||||
msg['To'] = email_to
|
msg['To'] = email_to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue