diff Modules/main.c @ 67193:b7be652daf6e

Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833.
author Georg Brandl <georg@python.org>
date Tue, 28 Dec 2010 18:30:18 +0000
parents f35a6d7e325f
children 0933c3753a71
line wrap: on
line diff
--- a/Modules/main.c	Tue Dec 28 17:12:43 2010 +0000
+++ b/Modules/main.c	Tue Dec 28 18:30:18 2010 +0000
@@ -319,7 +319,6 @@
     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 @@
             break;
 
         case 'q':
-            quiet++;
+            Py_QuietFlag++;
             break;
 
         /* This space reserved for other options */
@@ -594,7 +593,7 @@
 #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",