Skip to content

Commit e847eb1

Browse files
committed
Track unsupported python better
1 parent 784c2ec commit e847eb1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

uncompyle6/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,14 @@ def main(
438438
if str(e).startswith("Unsupported Python"):
439439
sys.stdout.write("\n")
440440
sys.stderr.write(f"\n# Unsupported bytecode in file {infile}\n# {e}\n")
441+
failed_files += 1
442+
if current_outfile:
443+
outstream.close()
444+
os.rename(current_outfile, current_outfile + "_failed")
445+
else:
446+
sys.stderr.write("\n# %s" % sys.exc_info()[1])
447+
sys.stderr.write("\n# Can't uncompile %s\n" % infile)
448+
441449
else:
442450
if outfile:
443451
outstream.close()

0 commit comments

Comments
 (0)