Ticket #9158: django-admin-stdout2011.diff
File django-admin-stdout2011.diff, 1.4 KB (added by , 14 years ago) |
---|
-
django/core/management/__init__.py
251 251 try: 252 252 app_name = get_commands()[subcommand] 253 253 except KeyError: 254 sys.std err.write("Unknown command: %r\nType '%s help' for usage.\n" % \254 sys.stdout.write("Unknown command: %r\nType '%s help' for usage.\n" % \ 255 255 (subcommand, self.prog_name)) 256 256 sys.exit(1) 257 257 if isinstance(app_name, BaseCommand): … … 365 365 self.fetch_command(args[2]).print_help(self.prog_name, args[2]) 366 366 else: 367 367 parser.print_lax_help() 368 sys.std err.write(self.main_help_text() + '\n')368 sys.stdout.write(self.main_help_text() + '\n') 369 369 sys.exit(1) 370 370 # Special-cases: We want 'django-admin.py --version' and 371 371 # 'django-admin.py --help' to work, for backwards compatibility. … … 374 374 pass 375 375 elif self.argv[1:] in (['--help'], ['-h']): 376 376 parser.print_lax_help() 377 sys.std err.write(self.main_help_text() + '\n')377 sys.stdout.write(self.main_help_text() + '\n') 378 378 else: 379 379 self.fetch_command(subcommand).run_from_argv(self.argv) 380 380