summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index f9d4246..cce854f 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -982,7 +982,8 @@ get_sourcefile(const char *file)
}
len = strlen(file);
- if (len > MAXPATHLEN || PyOS_stricmp(&file[len-4], ".pyc") != 0) {
+ /* match '*.py?' */
+ if (len > MAXPATHLEN || PyOS_strnicmp(&file[len-4], ".py", 3) != 0) {
return PyUnicode_DecodeFSDefault(file);
}