summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-12-28 18:30:18 (GMT)
committerGeorg Brandl <georg@python.org>2010-12-28 18:30:18 (GMT)
commit8aa7e999b5ab87cdbefe441649c223647875c110 (patch)
tree1fc0ca2cc25768d07c0ac241a053c2e07809a919 /Modules/main.c
parent31e3b77fea0a1c4703bade2c68b1252505a77bc7 (diff)
downloadcpython-8aa7e999b5ab87cdbefe441649c223647875c110.zip
cpython-8aa7e999b5ab87cdbefe441649c223647875c110.tar.gz
cpython-8aa7e999b5ab87cdbefe441649c223647875c110.tar.bz2
Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833.
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 3803eee..93d093d 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -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",