Fix closes issue # 15033 - Return the proper exitcode for failure when modules are invoked using -m switch. Patch contributed by Jeff Knupp

This commit is contained in:
Senthil Kumaran 2012-07-04 19:50:29 -07:00
parent d0f5f4827d
commit 3b30b19e0a
3 changed files with 21 additions and 2 deletions

View file

@ -583,7 +583,7 @@ Py_Main(int argc, char **argv)
sts = PyRun_SimpleStringFlags(command, &cf) != 0;
free(command);
} else if (module) {
sts = RunModule(module, 1);
sts = (RunModule(module, 1) != 0);
free(module);
}
else {