Simple code cleanups.
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
# Standard library imports.
|
||||
from pathlib import Path
|
||||
|
||||
# External library imports.
|
||||
import filetype
|
||||
from PIL import Image
|
||||
|
||||
# Django imports.
|
||||
from django.core.management.base import BaseCommand
|
||||
@@ -16,6 +12,7 @@ from viewer.utils import make_thumbnail
|
||||
# Command subclass. #
|
||||
###########################################################################################
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
Assorted data fix and clean up commands for the Meters module.
|
||||
@@ -25,7 +22,7 @@ class Command(BaseCommand):
|
||||
"""
|
||||
Goes through the GALLERY_ROOT directory recursively and creates a new thumbnail
|
||||
for each image that does not have a corresponding file (same name) in the THUMBNAILS_ROOT
|
||||
directory.
|
||||
directory.
|
||||
"""
|
||||
|
||||
# Make a thumbnail for each file in the current directory.
|
||||
@@ -40,5 +37,5 @@ class Command(BaseCommand):
|
||||
try:
|
||||
self._make_missing_thumbnails(settings.GALLERY_ROOT)
|
||||
|
||||
except KeyboardInterrupt as e:
|
||||
except KeyboardInterrupt:
|
||||
self.stderr.write(self.style.ERROR('\nInterrupted'))
|
||||
|
||||
Reference in New Issue
Block a user