old_contents: from optparse import make_option
  from django.core.management.base import BaseCommand, CommandError
  from django.core.management import call_command, get_commands, load_command_class
  from django.db import connection
  from tenant_schemas.management.commands import InteractiveTenantOption
  
  
  class Command(InteractiveTenantOption, BaseCommand):
      help = "Wrapper around django commands for use with an individual tenant"
  
      def run_from_argv(self, argv):
          """
          Changes the option_list to use the options from the wrapped command.
          Adds schema parameter to specifiy which schema will be used when
          executing the wrapped command.
          """
          # load the command object.
          try:
              app_name = get_commands()[argv[2]]
          except KeyError:
              raise CommandError("Unknown command: %r" % argv[2])
  
          if isinstance(app_name, BaseCommand):
              # if the command is already loaded, use it directly.
              klass = app_name
          else:
              klass = load_command_class(app_name, argv[2])
  
          self.option_list = klass.option_list + (
              make_option("-s", "--schema", dest="schema_name", help="specify tenant schema"),
          )
  
          super(Command, self).run_from_argv(argv)
  
      def handle(self, *args, **options):
          tenant = self.get_tenant_from_options_or_interactive(**options)
          connection.set_tenant(tenant)
  
          call_command(*args, **options)
  
new_contents: from optparse import make_option
  from django.core.management.base import BaseCommand, CommandError
  from django.core.management import call_command, get_commands, load_command_class
  from django.db import connection
  from tenant_schemas.management.commands import InteractiveTenantOption
  
  
  class Command(InteractiveTenantOption, BaseCommand):
      help = "Wrapper around django commands for use with an individual tenant"
  
      def run_from_argv(self, argv):
          """
          Changes the option_list to use the options from the wrapped command.
          Adds schema parameter to specifiy which schema will be used when
          executing the wrapped command.
          """
          # load the command object.
          try:
              app_name = get_commands()[argv[2]]
          except KeyError:
              raise CommandError("Unknown command: %r" % argv[2])
  
          if isinstance(app_name, BaseCommand):
              # if the command is already loaded, use it directly.
              klass = app_name
          else:
              klass = load_command_class(app_name, argv[2])
  
          super(Command, self).run_from_argv(argv)
  
      def handle(self, *args, **options):
          tenant = self.get_tenant_from_options_or_interactive(**options)
          connection.set_tenant(tenant)
  
          call_command(*args, **options)
  
subject: Remove duplicated --schema option for tenant_command