mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Try to be a bit more consistent on all platforms:
python . python < . both print a message, return non-zero and do not core dump.
This commit is contained in:
parent
8ff212034e
commit
72c2c062d7
3 changed files with 8 additions and 15 deletions
|
@ -364,7 +364,8 @@ Py_Main(int argc, char **argv)
|
|||
struct stat sb;
|
||||
if (fstat(fileno(fp), &sb) == 0 &&
|
||||
S_ISDIR(sb.st_mode)) {
|
||||
fprintf(stderr, "%s: warning '%s' is a directory\n", argv[0], filename);
|
||||
fprintf(stderr, "%s: '%s' is a directory, cannot continue\n", argv[0], filename);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue