mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833.
This commit is contained in:
parent
31e3b77fea
commit
8aa7e999b5
6 changed files with 14 additions and 4 deletions
|
@ -319,7 +319,6 @@ Py_Main(int argc, wchar_t **argv)
|
|||
int stdin_is_interactive = 0;
|
||||
int help = 0;
|
||||
int version = 0;
|
||||
int quiet = 0;
|
||||
int saw_unbuffered_flag = 0;
|
||||
PyCompilerFlags cf;
|
||||
|
||||
|
@ -427,7 +426,7 @@ Py_Main(int argc, wchar_t **argv)
|
|||
break;
|
||||
|
||||
case 'q':
|
||||
quiet++;
|
||||
Py_QuietFlag++;
|
||||
break;
|
||||
|
||||
/* This space reserved for other options */
|
||||
|
@ -594,7 +593,7 @@ Py_Main(int argc, wchar_t **argv)
|
|||
#endif
|
||||
Py_Initialize();
|
||||
|
||||
if (!quiet && (Py_VerboseFlag ||
|
||||
if (!Py_QuietFlag && (Py_VerboseFlag ||
|
||||
(command == NULL && filename == NULL &&
|
||||
module == NULL && stdin_is_interactive))) {
|
||||
fprintf(stderr, "Python %s on %s\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue