Permalink
Browse files

Cast to string on joining string, fixes an issue with some files prin…

…ting
  • Loading branch information...
simoncadman committed Jan 23, 2012
1 parent c64a9b5 commit 397bd83c243f40f06f5f56a2f28c3d38b51e9ca4
Showing with 2 additions and 2 deletions.
  1. +2 −2 printer.py
View
@@ -154,15 +154,15 @@ def EncodeMultiPart(fields, files, file_type='application/xml'):
lines.append('--' + Printer.BOUNDARY)
lines.append('Content-Disposition: form-data; name="%s"' % key)
lines.append('') # blank line
- lines.append(value)
+ lines.append(str(value))
for (key, filename, value) in files:
lines.append('--' + Printer.BOUNDARY)
lines.append(
'Content-Disposition: form-data; name="%s"; filename="%s"'
% (key, filename))
lines.append('Content-Type: %s' % file_type)
lines.append('') # blank line
- lines.append(value)
+ lines.append(str(value))
lines.append('--' + Printer.BOUNDARY + '--')
lines.append('') # blank line
return Printer.CRLF.join(lines)

0 comments on commit 397bd83

Please sign in to comment.