[Python-checkins] cpython: Issue #17222: fix a mix-up in some exception messages.

brett.cannon python-checkins at python.org
Mon Jun 17 23:48:36 CEST 2013


http://hg.python.org/cpython/rev/e2ccfb096e6a
changeset:   84200:e2ccfb096e6a
user:        Brett Cannon <brett at python.org>
date:        Mon Jun 17 17:48:30 2013 -0400
summary:
  Issue #17222: fix a mix-up in some exception messages.

Reported by Arfrever Frehtes Taifersar Arahesis.

files:
  Lib/py_compile.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/py_compile.py b/Lib/py_compile.py
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -112,11 +112,11 @@
     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:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list