Commit 948f99f6 authored by Guido van Rossum's avatar Guido van Rossum

never close the file in imp.load_...

parent d74ce3e0
......@@ -857,8 +857,6 @@ imp_load_compiled(self, args)
if (fp == NULL)
return NULL;
m = load_compiled_module(name, pathname, fp);
if (fob == NULL)
fclose(fp);
return m;
}
......@@ -877,8 +875,6 @@ imp_load_dynamic(self, args)
if (fob)
fp = get_file(pathname, fob, "r");
m = load_dynamic_module(name, pathname, fp);
if (fob == NULL)
fclose(fp);
return m;
}
......@@ -898,8 +894,6 @@ imp_load_source(self, args)
if (fp == NULL)
return NULL;
m = load_source_module(name, pathname, fp);
if (fob == NULL)
fclose(fp);
return m;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment