Skip to content

Commit 026f35b

Browse files
committed
gh-127794: Remove one variable
1 parent fae3664 commit 026f35b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib/email/_policybase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __add__(self, other):
9090
"""
9191
return self.clone(**other.__dict__)
9292

93-
def validate_header(name, value):
93+
def validate_header(name):
9494
# Validate header name according to RFC 5322
9595
import re
9696
if not re.match(r'^[^\s:]+$', name):
@@ -322,7 +322,7 @@ def header_store_parse(self, name, value):
322322
"""+
323323
The name and value are returned unmodified.
324324
"""
325-
validate_header(name, value)
325+
validate_header(name)
326326
return (name, value)
327327

328328
def header_fetch_parse(self, name, value):

Lib/email/policy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def header_store_parse(self, name, value):
140140
"""
141141
if hasattr(value, 'name') and value.name.lower() == name.lower():
142142
return (name, value)
143-
validate_header(name, value)
143+
validate_header(name)
144144
if isinstance(value, str) and len(value.splitlines())>1:
145145
# XXX this error message isn't quite right when we use splitlines
146146
# (see issue 22233), but I'm not sure what should happen here.

0 commit comments

Comments
 (0)