From ff18ca1d2e5013f22aaaf8d408e7f4ab1fa6d826 Mon Sep 17 00:00:00 2001 From: Johannes Linke Date: Sat, 5 Dec 2015 13:23:53 +0100 Subject: [PATCH] Fix a deprecation warning --- compressor/management/commands/compress.py | 6 +++--- compressor/management/commands/mtime_cache.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compressor/management/commands/compress.py b/compressor/management/commands/compress.py index 0905a81..7b65066 100644 --- a/compressor/management/commands/compress.py +++ b/compressor/management/commands/compress.py @@ -6,7 +6,7 @@ from fnmatch import fnmatch from optparse import make_option import django -from django.core.management.base import NoArgsCommand, CommandError +from django.core.management.base import BaseCommand, CommandError import django.template from django.template import Context from django.utils import six @@ -40,9 +40,9 @@ else: from StringIO import StringIO -class Command(NoArgsCommand): +class Command(BaseCommand): help = "Compress content outside of the request/response cycle" - option_list = NoArgsCommand.option_list + ( + option_list = BaseCommand.option_list + ( make_option('--extension', '-e', action='append', dest='extensions', help='The file extension(s) to examine (default: ".html", ' 'separate multiple extensions with commas, or use -e ' diff --git a/compressor/management/commands/mtime_cache.py b/compressor/management/commands/mtime_cache.py index e96f004..b1605ba 100644 --- a/compressor/management/commands/mtime_cache.py +++ b/compressor/management/commands/mtime_cache.py @@ -2,15 +2,15 @@ import fnmatch import os from optparse import make_option -from django.core.management.base import NoArgsCommand, CommandError +from django.core.management.base import BaseCommand, CommandError from compressor.conf import settings from compressor.cache import cache, get_mtime, get_mtime_cachekey -class Command(NoArgsCommand): +class Command(BaseCommand): help = "Add or remove all mtime values from the cache" - option_list = NoArgsCommand.option_list + ( + option_list = BaseCommand.option_list + ( make_option('-i', '--ignore', action='append', default=[], dest='ignore_patterns', metavar='PATTERN', help="Ignore files or directories matching this glob-style "