diff Python/pythonrun.c @ 2022:eee3d715f0cf legacy-trunk

Removed extraneous fclose() in case of .pyc file argument
author Jack Jansen <jack.jansen@cwi.nl>
date Wed, 14 Dec 1994 12:58:37 +0000
parents a7f269610ec2
children d7e91437f0a2
line wrap: on
line diff
--- a/Python/pythonrun.c	Wed Dec 14 12:57:12 1994 +0000
+++ b/Python/pythonrun.c	Wed Dec 14 12:58:37 1994 +0000
@@ -202,7 +202,7 @@
 	ext = filename + strlen(filename) - 4;
 	if ( strcmp(ext, ".pyc") == 0 ) {
 		/* Try to run a pyc file. First, re-open in binary */
-		fclose(fp);
+		/* Don't close, done in main: fclose(fp); */
 		if( (fp = fopen(filename, "rb")) == NULL ) {
 			fprintf(stderr, "python: Can't reopen .pyc file\n");
 			return -1;