Skip to content

Commit

Permalink
When transforming the payload to a Description key, clear the payload.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 20, 2025
1 parent 07aa607 commit dab1dd8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions importlib_metadata/_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ class Message(email.message.Message):
Description: First line of description.
Second line of description.
<BLANKLINE>
First line of description.
Second line of description.
<BLANKLINE>
"""

Expand Down Expand Up @@ -108,6 +106,7 @@ def redent(value):
headers = [(key, redent(value)) for key, value in vars(self)['_headers']]
if self._payload:
headers.append(('Description', self.get_payload()))
self.set_payload('')
return headers

def as_string(self):
Expand Down

0 comments on commit dab1dd8

Please sign in to comment.