Skip to content

Commit 91ff700

Browse files
authored
gh-122989: Replace duplicate “self.policy.linesep” with “linesep” (#123002)
`linesep` is already defined as `self.policy.linesep`. It appears that previous refactor was not completed.
1 parent 135dad9 commit 91ff700

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/email/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def _write_headers(self, msg):
227227
folded = self.policy.fold(h, v)
228228
if self.policy.verify_generated_headers:
229229
linesep = self.policy.linesep
230-
if not folded.endswith(self.policy.linesep):
230+
if not folded.endswith(linesep):
231231
raise HeaderWriteError(
232232
f'folded header does not end with {linesep!r}: {folded!r}')
233233
if NEWLINE_WITHOUT_FWSP.search(folded.removesuffix(linesep)):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy