]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Removed extraneous fclose() in case of .pyc file argument
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 14 Dec 1994 12:58:37 +0000 (12:58 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 14 Dec 1994 12:58:37 +0000 (12:58 +0000)
Python/pythonrun.c

index 712a396e1c0892dfefa8c2224260ec4e97b0ae9a..de0de072febda58c85d67e56fae10f1c4c9eae6d 100644 (file)
@@ -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;