diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-03 13:31:36 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-03 13:31:36 (GMT) |
commit | cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14 (patch) | |
tree | 1995f01bd8828ae9647ad407e40dd8584ca843da /Mac/Python/macmain.c | |
parent | cb60dae6a1a7841138421866ea15870f6297cf8b (diff) | |
download | cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.zip cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.gz cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.bz2 |
Merging appropriate 2.1.1 fixes back into the main trunk.
Diffstat (limited to 'Mac/Python/macmain.c')
-rw-r--r-- | Mac/Python/macmain.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c index 10c5a5f..b82395c 100644 --- a/Mac/Python/macmain.c +++ b/Mac/Python/macmain.c @@ -486,6 +486,11 @@ PyMac_InitApplication() PyMac_FixGUSIcd(); #endif } + /* Check that the first argument is a text file */ + if ( PyMac_getfiletype(argv[1]) != 'TEXT' ) { + Alert(NOTASCRIPT_ID, NULL); + exit(0); + } } Py_Main(argc, argv); } |