MemoryError when converting bytearray to string

10 views
Skip to first unread message

Denis Kochetkov

unread,
Dec 18, 2014, 8:41:46 AM12/18/14
to pef...@googlegroups.com
Hello!

Following MemoryError often occurs on our build server:
   File "d:\jenkins\workspace\PAX-2.5.0-agent-win\Sources\Build\pefile.py", line 2187, in write
     new_file_data = ''.join(chr(c) for c in file_data)
 MemoryError
 </Exception>

We use Python 2.7 which supports bytearray type already. The conversion ''.join(chr(c) for c in file_data does NOT required for bytearray type. 

I attached patch which replace this conversion on bytesaray's own string conversion.

Could you please apply attached patch?

With best regards, 
Denis Kochetkov


pefile.py.patch

Denis Kochetkov

unread,
Dec 20, 2014, 3:56:59 PM12/20/14
to pef...@googlegroups.com
This post is duplicate of previous
https://groups.google.com/forum/m/#!topic/pefile/MwakHCy57TU
Both contains same patch. Sorry for inconvenience.
Reply all
Reply to author
Forward
0 new messages