Raw image mediatype had a non-unicode logging call
authorOdin Hørthe Omdal <odinho@opera.com>
Sun, 3 Aug 2014 16:07:28 +0000 (18:07 +0200)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 7 Sep 2014 14:43:49 +0000 (09:43 -0500)
Was causing UnicodeDecodeError when file/folder was not ascii.
Fixes bug #935.

mediagoblin/media_types/raw_image/processing.py

index 55a48b50a90efafa9f500f1bae8f187913d02098..5ff54cf37cb61a7c2475426fbccb1e58b5069719 100644 (file)
@@ -67,8 +67,8 @@ class InitialRawProcessor(InitialProcessor):
         # Extract the biggest preview and write it as our working image
         md.previews[-1].write_to_file(
             self.process_filename.encode('utf-8'))
-        self.process_filename += ".jpg"
-        _log.debug('Wrote new file from {0} to preview (jpg) {1}'.format(
+        self.process_filename += '.jpg'
+        _log.debug(u'Wrote new file from {0} to preview (jpg) {1}'.format(
             self._original_raw, self.process_filename))
 
         # Override the namebuilder with our new jpg-based name