Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9674bd0a
Commit
9674bd0a
authored
Jun 17, 2013
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17222: fix a mix-up in some exception messages.
Reported by Arfrever Frehtes Taifersar Arahesis.
parent
e08d4881
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/py_compile.py
Lib/py_compile.py
+2
-2
No files found.
Lib/py_compile.py
View file @
9674bd0a
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment