summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-09 05:58:11 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-09 05:58:11 (GMT)
commit72c2c062d71c499863ff6e260525faaea4a53dbb (patch)
treea93e5551c95aff7b117588fa91465a9b15558d45 /Modules/main.c
parent8ff212034e3386916f1a35ff3b0c955aa1ea2b4a (diff)
downloadcpython-72c2c062d71c499863ff6e260525faaea4a53dbb.zip
cpython-72c2c062d71c499863ff6e260525faaea4a53dbb.tar.gz
cpython-72c2c062d71c499863ff6e260525faaea4a53dbb.tar.bz2
Try to be a bit more consistent on all platforms:
python . python < . both print a message, return non-zero and do not core dump.
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index f6fa48b..8e7c50b 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -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;
}
}
}