Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
45e7c4c8
Commit
45e7c4c8
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Ještě jeden typ výjimek při parsování e-mailových adres
parent
070a21d6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/users.py
+1
-1
1 addition, 1 deletion
mo/users.py
with
1 addition
and
1 deletion
mo/users.py
+
1
−
1
View file @
45e7c4c8
...
...
@@ -27,7 +27,7 @@ def normalize_email(addr: str) -> str:
# Tady úmyslně používáme knihovnu jen ke kontrole a ne k normalizaci,
# protože nechceme riskovat, že se normalizovaný tvar časem změní.
email
.
headerregistry
.
Address
(
addr_spec
=
addr
)
except
email
.
errors
.
HeaderParseError
:
except
(
email
.
errors
.
HeaderParseError
,
ValueError
)
:
raise
mo
.
CheckError
(
'
Chybná syntaxe mailové adresy
'
)
# XXX: Striktně vzato, tohle není korektní, protože některé domény mohou
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment