From 389b2d2e6c1224bc91ae70a52470a26d785fdd87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Odin=20H=C3=B8rthe=20Omdal?= <odinho@opera.com>
Date: Sun, 3 Aug 2014 18:07:28 +0200
Subject: [PATCH] Raw image mediatype has a logging call not encoding to utf8
Was causing UnicodeDecodeError when file/folder was not ascii.
Fixes bug #935.
---
mediagoblin/media_types/raw_image/processing.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mediagoblin/media_types/raw_image/processing.py b/mediagoblin/media_types/raw_image/processing.py
index 83b0155..c3fe827 100644
a
|
b
|
class InitialRawProcessor(InitialProcessor):
|
67 | 67 | # Extract the biggest preview and write it as our working image |
68 | 68 | md.previews[-1].write_to_file( |
69 | 69 | self.process_filename.encode('utf-8')) |
70 | | self.process_filename += ".jpg" |
| 70 | self.process_filename += '.jpg' |
71 | 71 | _log.debug('Wrote new file from {0} to preview (jpg) {1}'.format( |
72 | | self._original_raw, self.process_filename)) |
| 72 | self._original_raw.encode('utf-8'), |
| 73 | self.process_filename.encode('utf-8'))) |
73 | 74 | |
74 | 75 | # Override the namebuilder with our new jpg-based name |
75 | 76 | self.name_builder = FilenameBuilder(self.process_filename) |