diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 712a396e1c0..de0de072feb 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -202,7 +202,7 @@ run_script(fp, filename) 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;