mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Properly guard against special-casing.
This commit is contained in:
parent
16475adcbb
commit
578393b286
1 changed files with 1 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ class _LoadSourceCompatibility(_bootstrap._SourceFileLoader):
|
|||
def get_data(self, path):
|
||||
"""Gross hack to contort SourceFileLoader to deal w/ load_source()'s bad
|
||||
API."""
|
||||
if path == self._path:
|
||||
if self.file and path == self._path:
|
||||
with self.file:
|
||||
# Technically should be returning bytes, but
|
||||
# SourceLoader.get_code() just passed what is returned to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue