summaryrefslogtreecommitdiffstats
path: root/Lib/email/policy.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email/policy.py')
-rw-r--r--Lib/email/policy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/policy.py b/Lib/email/policy.py
index ea90a8f..18946c3 100644
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -104,7 +104,7 @@ class EmailPolicy(Policy):
"""
if hasattr(value, 'name') and value.name.lower() == name.lower():
return (name, value)
- if len(value.splitlines())>1:
+ if isinstance(value, str) and len(value.splitlines())>1:
raise ValueError("Header values may not contain linefeed "
"or carriage return characters")
return (name, self.header_factory(name, value))