Ticket #9158: django-admin-stdout2011.diff

File django-admin-stdout2011.diff, 1.4 KB (added by Dario Ocles, 14 years ago)

The patch was outdated. I updated this to the latest version.

  • django/core/management/__init__.py

     
    251251        try:
    252252            app_name = get_commands()[subcommand]
    253253        except KeyError:
    254             sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" % \
     254            sys.stdout.write("Unknown command: %r\nType '%s help' for usage.\n" % \
    255255                (subcommand, self.prog_name))
    256256            sys.exit(1)
    257257        if isinstance(app_name, BaseCommand):
     
    365365                self.fetch_command(args[2]).print_help(self.prog_name, args[2])
    366366            else:
    367367                parser.print_lax_help()
    368                 sys.stderr.write(self.main_help_text() + '\n')
     368                sys.stdout.write(self.main_help_text() + '\n')
    369369                sys.exit(1)
    370370        # Special-cases: We want 'django-admin.py --version' and
    371371        # 'django-admin.py --help' to work, for backwards compatibility.
     
    374374            pass
    375375        elif self.argv[1:] in (['--help'], ['-h']):
    376376            parser.print_lax_help()
    377             sys.stderr.write(self.main_help_text() + '\n')
     377            sys.stdout.write(self.main_help_text() + '\n')
    378378        else:
    379379            self.fetch_command(subcommand).run_from_argv(self.argv)
    380380
Back to Top