Merge lp:~mikemc/ubiquity/tolerate-weird-emails into lp:~mikemc/ubiquity/add-online-debug

Proposed by Mike McCracken
Status: Merged
Approved by: Mike McCracken
Approved revision: 5812
Merge reported by: Mike McCracken
Merged at revision: not available
Proposed branch: lp:~mikemc/ubiquity/tolerate-weird-emails
Merge into: lp:~mikemc/ubiquity/add-online-debug
Diff against target: 29 lines (+4/-4)
2 files modified
tests/test_ubi_ubuntuone.py (+3/-1)
ubiquity/plugins/ubi-ubuntuone.py (+1/-3)
To merge this branch: bzr merge lp:~mikemc/ubiquity/tolerate-weird-emails
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve
dobey (community) Approve
Review via email: mp+149685@code.launchpad.net

Commit message

- Make email validator more liberal to handle all possible valid emails.

Description of the change

- Make email validator more liberal to handle all possible valid emails.

To post a comment you must log in.
Revision history for this message
dobey (dobey) wrote :

23 + print("SSO spawning cmd=%r" % cmd)

Is this meant to be here, or was put in for debugging?

review: Needs Information
5812. By Mike McCracken

remove print

Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Brian Curtin (brian.curtin) wrote :

Looks good.

review: Approve
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Please mark as merged, to clean up merge proposals on ubiquity page.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_ubi_ubuntuone.py'
2--- tests/test_ubi_ubuntuone.py 2012-12-04 09:59:38 +0000
3+++ tests/test_ubi_ubuntuone.py 2013-02-20 21:11:19 +0000
4@@ -44,7 +44,9 @@
5
6 def test_verify_email_entry(self):
7 self.assertFalse(self.page._verify_email_entry("meep"))
8- self.assertTrue(self.page._verify_email_entry("mup@example.com"))
9+ self.assertTrue(self.page._verify_email_entry("mup.frb@example.com"))
10+ self.assertTrue(self.page._verify_email_entry("mup@example"))
11+ self.assertTrue(self.page._verify_email_entry("mup\@foo.com@example"))
12
13 def test_verify_password_entry(self):
14 self.assertFalse(self.page._verify_password_entry(""))
15
16=== modified file 'ubiquity/plugins/ubi-ubuntuone.py'
17--- ubiquity/plugins/ubi-ubuntuone.py 2012-12-04 15:19:26 +0000
18+++ ubiquity/plugins/ubi-ubuntuone.py 2013-02-20 21:11:19 +0000
19@@ -295,9 +295,7 @@
20
21 def _verify_email_entry(self, email):
22 """Return True if the email address looks valid"""
23- EMAIL_REGEXP = "[a-zA-Z]+@[a-zA-Z]+\.[a-zA-Z]+"
24- match = re.match(EMAIL_REGEXP, email)
25- return (match is not None)
26+ return '@' in email
27
28 def _verify_password_entry(self, password):
29 """Return True if there is a valid password"""

Subscribers

People subscribed via source and target branches

to all changes: