sys.stdout always has an encoding attribute
Bug #1149813 reported by
Tobias Schlauch
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python WebDAV Library |
New
|
Undecided
|
Tobias Schlauch |
Bug Description
For details see the prosed merge request.
Related branches
lp:~glyphobet/python-webdav-lib/default
Ready for review
for merging
into
lp:python-webdav-lib
- DataFinderTeam: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedsrc/webdav/WebdavResponse.py (+1/-1)
description: | updated |
To post a comment you must log in.
i think it is bad to rely on sys.stdout, some programs do not have it set (like a python module running in wsgi with apache2 server). it's safer to use:
return result. encode( sys.getfilesyst emencoding( ) or "ascii", "replace")