diff options
author | Brett Cannon <brett@python.org> | 2012-04-17 03:11:28 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-17 03:11:28 (GMT) |
commit | 578393b2862173d54baa32684812617b2e995412 (patch) | |
tree | 3454f3888f177300cf8d93ba967e0700ebc35af8 /Lib/imp.py | |
parent | 16475adcbb9b8131da2a1615bfbeb34a358e7400 (diff) | |
download | cpython-578393b2862173d54baa32684812617b2e995412.zip cpython-578393b2862173d54baa32684812617b2e995412.tar.gz cpython-578393b2862173d54baa32684812617b2e995412.tar.bz2 |
Properly guard against special-casing.
Diffstat (limited to 'Lib/imp.py')
-rw-r--r-- | Lib/imp.py | 2 |
1 files changed, 1 insertions, 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 |