diff Mac/Python/macmain.c @ 18962:d7590122f9a2 legacy-trunk

Merging appropriate 2.1.1 fixes back into the main trunk.
author Jack Jansen <jack.jansen@cwi.nl>
date Fri, 03 Aug 2001 13:31:36 +0000
parents 8cdff545cbde
children c9647fa78f05
line wrap: on
line diff
--- a/Mac/Python/macmain.c	Fri Aug 03 13:19:56 2001 +0000
+++ b/Mac/Python/macmain.c	Fri Aug 03 13:31:36 2001 +0000
@@ -486,6 +486,11 @@
 			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);
 }