Pypy 2.7 fixes

* pypy doesn't seem to grok sys.stdout.flush() sometimes?
* pypy has extra come_froms for return_if_stmt
This commit is contained in:
rocky
2019-01-05 13:21:24 -05:00
parent 37750814b9
commit 1a70f75ffc
2 changed files with 20 additions and 3 deletions

View File

@@ -315,10 +315,19 @@ def main(in_base, out_base, files, codes, outfile=None,
sys.stdout.write("%s\r" %
status_msg(do_verify, tot_files, okay_files, failed_files,
verify_failed_files, do_verify))
sys.stdout.flush()
try:
# FIXME: Something is weird with Pypy here
sys.stdout.flush()
except:
pass
if current_outfile:
sys.stdout.write("\n")
sys.stdout.flush()
try:
# FIXME: Something is weird with Pypy here
sys.stdout.flush()
except:
pass
pass
return (tot_files, okay_files, failed_files, verify_failed_files)