Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r75896:1cd58e083148 Date: 2015-02-15 15:56 +0100 http://bitbucket.org/pypy/pypy/changeset/1cd58e083148/
Log: Fix diff --git a/pypy/module/_io/interp_iobase.py b/pypy/module/_io/interp_iobase.py --- a/pypy/module/_io/interp_iobase.py +++ b/pypy/module/_io/interp_iobase.py @@ -385,20 +385,22 @@ def flush_all(self, space): while True: handles = self.get_all_handles() - if len(handles) == 0: - break self.initialize() # reset the state here + progress = False for wr in handles: w_iobase = wr() if w_iobase is None: continue + progress = True try: space.call_method(w_iobase, 'flush') except OperationError: # Silencing all errors is bad, but getting randomly # interrupted here is equally as bad, and potentially # more frequent (because of shutdown issues). - pass + pass + if not progress: + break def get_autoflusher(space): return space.fromcache(AutoFlusher) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit