https://github.com/python/cpython/commit/91ff700de28f3415cbe44f58ce84a2670b8c9f15
commit: 91ff700de28f3415cbe44f58ce84a2670b8c9f15
branch: main
author: Damien <[email protected]>
committer: terryjreedy <[email protected]>
date: 2024-09-04T02:30:25-04:00
summary:
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.
files:
M Lib/email/generator.py
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
index 42c84aa4da1044..205caf0fe9e81d 100644
--- a/Lib/email/generator.py
+++ b/Lib/email/generator.py
@@ -227,7 +227,7 @@ def _write_headers(self, msg):
folded = self.policy.fold(h, v)
if self.policy.verify_generated_headers:
linesep = self.policy.linesep
- if not folded.endswith(self.policy.linesep):
+ if not folded.endswith(linesep):
raise HeaderWriteError(
f'folded header does not end with {linesep!r}:
{folded!r}')
if NEWLINE_WITHOUT_FWSP.search(folded.removesuffix(linesep)):
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]