mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Patch #1677862: Require a space or tab after import in .pth files.
This commit is contained in:
parent
eb62357a2e
commit
2681beb23e
3 changed files with 14 additions and 7 deletions
|
@ -134,7 +134,7 @@ def addpackage(sitedir, name, known_paths):
|
|||
for line in f:
|
||||
if line.startswith("#"):
|
||||
continue
|
||||
if line.startswith("import"):
|
||||
if line.startswith("import ") or line.startswith("import\t"):
|
||||
exec line
|
||||
continue
|
||||
line = line.rstrip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue