diff options
author | Brett Cannon <brett@python.org> | 2013-06-17 17:48:30 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-06-17 17:48:30 -0400 |
commit | 9674bd0a94dc487dba151636152e9f9fe67b35cc (patch) | |
tree | bd64807f0e7df694c6efdf392a059f34d1f0b387 | |
parent | e08d4881f8552864bbca34908851a6004c4d6073 (diff) | |
download | cpython-git-9674bd0a94dc487dba151636152e9f9fe67b35cc.tar.gz |
Issue #17222: fix a mix-up in some exception messages.
Reported by Arfrever Frehtes Taifersar Arahesis.
-rw-r--r-- | Lib/py_compile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/py_compile.py b/Lib/py_compile.py index 9919debca0..1277b93ea5 100644 --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -112,11 +112,11 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1): if os.path.islink(cfile): msg = ('{} is a symlink and will be changed into a regular file if ' 'import writes a byte-compiled file to it') - raise FileExistsError(msg.format(file, cfile)) + raise FileExistsError(msg.format(cfile)) elif os.path.exists(cfile) and not os.path.isfile(cfile): msg = ('{} is a non-regular file and will be changed into a regular ' 'one if import writes a byte-compiled file to it') - raise FileExistsError(msg.format(file, cfile)) + raise FileExistsError(msg.format(cfile)) loader = importlib.machinery.SourceFileLoader('<py_compile>', file) source_bytes = loader.get_data(file) try: |