0001-misc-make-sure-no-unicode-is-emitted-in-traces-11005.patch
wcs/qommon/publisher.py | ||
---|---|---|
164 | 164 |
def _generate_plaintext_error(self, request, original_response, |
165 | 165 |
exc_type, exc_value, tb, limit = None): |
166 | 166 |
if exc_value: |
167 |
exc_value = unicode(str(exc_value), errors='ignore') |
|
167 |
exc_value = unicode(str(exc_value), errors='ignore').encode('ascii')
|
|
168 | 168 |
if not self.USE_LONG_TRACES: |
169 | 169 |
if not request: |
170 | 170 |
# this happens when an exception is raised by an afterjob |
... | ... | |
305 | 305 | |
306 | 306 |
error_summary = traceback.format_exception_only(exc_type, exc_value) |
307 | 307 |
error_summary = error_summary[0][0:-1] # de-listify and strip newline |
308 |
error_summary = unicode(str(error_summary), errors='ignore') |
|
308 |
error_summary = unicode(str(error_summary), errors='ignore').encode('ascii')
|
|
309 | 309 | |
310 | 310 |
plain_error_msg = self._generate_plaintext_error(request, |
311 | 311 |
original_response, |
312 |
- |