[New-bugs-announce] [issue16419] email.message._headers is a list

DDarko report at bugs.python.org
Tue Nov 6 04:39:12 CET 2012


New submission from DDarko:

in Python 3.3 lib.email.message


  File "email/message.py", line 151, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "email/generator.py", line 112, in flatten
    self._write(msg)
  File "email/generator.py", line 171, in _write
    self._write_headers(msg)
  File "email/generator.py", line 197, in _write_headers
    for h, v in msg.raw_items():
  File "email/message.py", line 441, in raw_items
    return iter(self._headers.copy())
AttributeError: 'list' object has no attribute 'copy'




http://hg.python.org/cpython/file/ec00f8570c55/Lib/email/message.py
in line 443 is:
return iter(self._headers.copy())
I think that it should be:
return iter(self._headers[:])

----------
components: Library (Lib)
messages: 174952
nosy: DDarko
priority: normal
severity: normal
status: open
title: email.message._headers is a list
type: crash
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16419>
_______________________________________


More information about the New-bugs-announce mailing list