Skip to content

Commit 29502a7

Browse files
committed
Fail instead
1 parent 2b0f29c commit 29502a7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/compileall.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,12 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0,
166166
name = os.path.basename(fullname)
167167

168168
# Without a cache_tag, we can only create legacy .pyc files. None of our
169-
# callers seem to expect this, so the best we can do is silently succeed
170-
# without creating anything.
169+
# callers seem to expect this, so the best we can do is fail without raising
171170
if not legacy and sys.implementation.cache_tag is None:
172171
if not quiet:
173172
print("No cache tag is available to generate .pyc path for {!r}"
174173
.format(fullname))
175-
return True
174+
return False
176175

177176
dfile = None
178177

0 commit comments

Comments
 (0)