Skip to content

Commit 86cda6c

Browse files
authored
use @staticmethod in Spices.py (#11257)
1 parent 75af79b commit 86cda6c

File tree

1 file changed

+6
-4
lines changed
  • files/usr/share/cinnamon/cinnamon-settings/bin

1 file changed

+6
-4
lines changed

files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,16 +581,18 @@ def _check_download_image_cache_complete(self, *args):
581581
self._advance_queue()
582582
self.emit('cache-loaded')
583583

584-
# checks for corrupt images in the cache so we can redownload them the next time we refresh
585-
def _is_bad_image(self, path):
584+
# checks for corrupt images in the cache, so we can redownload them the next time we refresh
585+
@staticmethod
586+
def _is_bad_image(path):
586587
try:
587588
Image.open(path)
588-
except IOError as detail:
589+
except IOError:
589590
return True
590591
return False
591592

592593
# make sure the thumbnail fits the correct format (we are expecting it to be <uuid>.png
593-
def _sanitize_thumb(self, basename):
594+
@staticmethod
595+
def _sanitize_thumb(basename):
594596
return basename.replace("jpg", "png").replace("JPG", "png").replace("PNG", "png")
595597

596598
def install(self, uuid):

0 commit comments

Comments
 (0)