<s> from __future__ import absolute_import <EOL> from optparse import make_option <EOL> from django . core . management . base import BaseCommand <EOL> from zerver . lib . actions import delete_all_user_sessions , delete_realm_user_sessions <EOL> from zerver . models import get_realm <EOL> class Command ( BaseCommand ) : <EOL> help = "<STR_LIT>" <EOL> option_list = BaseCommand . option_list + ( <EOL> make_option ( '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> action = '<STR_LIT:store>' , <EOL> default = None , <EOL> help = "<STR_LIT>" ) , <EOL> ) <EOL> def handle ( self , * args , ** options ) : <EOL> if options [ "<STR_LIT>" ] : <EOL> realm = get_realm ( options [ "<STR_LIT>" ] ) <EOL> delete_realm_user_sessions ( realm ) <EOL> else : <EOL> delete_all_user_sessions ( ) </s>
