summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/main.c b/Modules/main.c
index f38a5c3..eea848f 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -58,7 +58,7 @@ Options and arguments (and corresponding environment variables):\n\
static char *usage_2 = "\
-O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)\n\
-OO : remove doc-strings in addition to the -O optimizations\n\
--Q arg : division options: -Qold (default), -Qwarn, -Qnew\n\
+-Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\
-S : don't imply 'import site' on initialization\n\
-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
@@ -161,7 +161,11 @@ Py_Main(int argc, char **argv)
break;
}
if (strcmp(_PyOS_optarg, "warn") == 0) {
- Py_DivisionWarningFlag++;
+ Py_DivisionWarningFlag = 1;
+ break;
+ }
+ if (strcmp(_PyOS_optarg, "warnall") == 0) {
+ Py_DivisionWarningFlag = 2;
break;
}
if (strcmp(_PyOS_optarg, "new") == 0) {
@@ -170,8 +174,8 @@ Py_Main(int argc, char **argv)
break;
}
fprintf(stderr,
- "-Q option should be "
- "`-Qold', `-Qwarn' or `-Qnew' only\n");
+ "-Q option should be `-Qold', "
+ "`-Qwarn', `-Qwarnall', or `-Qnew' only\n");
usage(2, argv[0]);
/* NOTREACHED */