summaryrefslogtreecommitdiffstats
path: root/Mac/Python/macmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Python/macmain.c')
-rw-r--r--Mac/Python/macmain.c5
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);
}