Ticket #935: 0001-Raw-image-mediatype-had-a-non-unicode-logging-call.patch

File 0001-Raw-image-mediatype-had-a-non-unicode-logging-call.patch, 1.2 KB (added by Odin Hørthe Omdal (Velmont), 10 years ago)
  • mediagoblin/media_types/raw_image/processing.py

    From 1c015fade442a422d7b6d321214cac7cfedc652d 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 had a non-unicode logging call
    
    Was causing UnicodeDecodeError when file/folder was not ascii.
    Fixes bug #935.
    ---
     mediagoblin/media_types/raw_image/processing.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/mediagoblin/media_types/raw_image/processing.py b/mediagoblin/media_types/raw_image/processing.py
    index 83b0155..57554be 100644
    a b class InitialRawProcessor(InitialProcessor):  
    6767        # Extract the biggest preview and write it as our working image
    6868        md.previews[-1].write_to_file(
    6969            self.process_filename.encode('utf-8'))
    70         self.process_filename += ".jpg"
    71         _log.debug('Wrote new file from {0} to preview (jpg) {1}'.format(
     70        self.process_filename += '.jpg'
     71        _log.debug(u'Wrote new file from {0} to preview (jpg) {1}'.format(
    7272            self._original_raw, self.process_filename))
    7373
    7474        # Override the namebuilder with our new jpg-based name