<s> from django . core . management . base import BaseCommand <EOL> from captcha . models import get_safe_now <EOL> import sys <EOL> class Command ( BaseCommand ) : <EOL> help = "<STR_LIT>" <EOL> def handle ( self , ** options ) : <EOL> from captcha . models import CaptchaStore <EOL> verbose = int ( options . get ( '<STR_LIT>' ) ) <EOL> expired_keys = CaptchaStore . objects . filter ( expiration__lte = get_safe_now ( ) ) . count ( ) <EOL> if verbose >= <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" % expired_keys ) <EOL> try : <EOL> CaptchaStore . remove_expired ( ) <EOL> except : <EOL> if verbose >= <NUM_LIT:1> : <EOL> print ( "<STR_LIT>" ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> if verbose >= <NUM_LIT:1> : <EOL> if expired_keys > <NUM_LIT:0> : <EOL> print ( "<STR_LIT>" % expired_keys ) <EOL> else : <EOL> print ( "<STR_LIT>" ) </s>
