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
|
@ -78,6 +78,7 @@ extern void _PyGILState_Fini(void);
|
|||
|
||||
int Py_DebugFlag; /* Needed by parser.c */
|
||||
int Py_VerboseFlag; /* Needed by import.c */
|
||||
int Py_QuietFlag; /* Needed by sysmodule.c */
|
||||
int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
|
||||
int Py_InspectFlag; /* Needed to determine whether to exit at SystemError */
|
||||
int Py_NoSiteFlag; /* Suppress 'import site' */
|
||||
|
|
|
@ -1417,7 +1417,8 @@ static PyStructSequence_Field flags_fields[] = {
|
|||
#endif
|
||||
/* {"unbuffered", "-u"}, */
|
||||
/* {"skip_first", "-x"}, */
|
||||
{"bytes_warning", "-b"},
|
||||
{"bytes_warning", "-b"},
|
||||
{"quiet", "-q"},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
@ -1461,6 +1462,7 @@ make_flags(void)
|
|||
/* SetFlag(saw_unbuffered_flag); */
|
||||
/* SetFlag(skipfirstline); */
|
||||
SetFlag(Py_BytesWarningFlag);
|
||||
SetFlag(Py_QuietFlag);
|
||||
#undef SetFlag
|
||||
|
||||
if (PyErr_Occurred()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue