From 755b6a86b6784ca5b1e8d427ce6e07442d16c974 Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Thu, 22 Aug 2013 10:06:50 -0700 Subject: [PATCH] skip ascii thumb resizing if necessary --- mediagoblin/media_types/ascii/processing.py | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mediagoblin/media_types/ascii/processing.py b/mediagoblin/media_types/ascii/processing.py index ef4727de..b3c2a298 100644 --- a/mediagoblin/media_types/ascii/processing.py +++ b/mediagoblin/media_types/ascii/processing.py @@ -157,22 +157,22 @@ class CommonAsciiProcessor(MediaProcessor): store_public(self.entry, 'thumb', tmp_thumb, self.name_builder.fill('{basename}.thumbnail.jpg')) - def _skip_resizing(self, font, thumb_size): - thumb_info = self.entry.get_file_metadata('thumb') + def _skip_resizing(self, font, thumb_size): + thumb_info = self.entry.get_file_metadata('thumb') - if not thumb_info: - return False + if not thumb_info: + return False - skip = True + skip = True - if thumb_info.get('font') != font: - skip = False - elif thumb_info.get('width') != thumb_size[0]: - skip = False - elif thumb_info.get('height') != thumb_size[1]: - skip = False + if thumb_info.get('font') != font: + skip = False + elif thumb_info.get('width') != thumb_size[0]: + skip = False + elif thumb_info.get('height') != thumb_size[1]: + skip = False - return skip + return skip class InitialProcessor(CommonAsciiProcessor): -- 2.25.1