summaryrefslogtreecommitdiff
path: root/Lib/compileall.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/compileall.py')
-rw-r--r--Lib/compileall.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py
index f1ff5ccdb9..f9ec4863df 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -207,15 +207,15 @@ def main():
try:
if compile_dests:
for dest in compile_dests:
- if os.path.isdir(dest):
+ if os.path.isfile(dest):
+ if not compile_file(dest, args.ddir, args.force, args.rx,
+ args.quiet, args.legacy):
+ success = False
+ else:
if not compile_dir(dest, args.maxlevels, args.ddir,
args.force, args.rx, args.quiet,
args.legacy):
success = False
- else:
- if not compile_file(dest, args.ddir, args.force, args.rx,
- args.quiet, args.legacy):
- success = False
return success
else:
return compile_path(legacy=args.legacy)