Menu

#6 Bug with dccreceive example

closed
nobody
None
5
2012-07-26
2009-09-21
Anonymous
No

dccreceive example line 29 (version 0.4.8) should be:

self.file = open(self.filename, 'w+b')

instead of

self.file = open(self.filename, 'w')

This won't work correctly on Windows since Windows does string encoding (i.e., change '\n' to '\r\n'). The fix is to open the file for writing in binary mode instead of text mode.

Discussion

  • Nobody/Anonymous

    'w+b' or 'wb' ?

     
  • Nobody/Anonymous

    Both works.

     
  • Jason R. Coombs

    Jason R. Coombs - 2012-04-24

    Fixed in 8be7926dbea1

     
Monday.com Logo