# HG changeset patch # User Thomas Arendsen Hein # Date 2012-09-18 15:00:58 # Node ID a7fa5bd1c914475593afd3e661520d51b0bd1ecc # Parent 2eac9641496dde7525293edd6cb9123886c3a11b wireproto: workaround for yield inside try/finally incompatible with python2.4 diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -567,8 +567,11 @@ def stream(repo, proto): else: for chunk in util.filechunkiter(sopener(name), limit=size): yield chunk - finally: + # replace with "finally:" when support for python 2.4 has been dropped + except Exception: sopener.mustaudit = oldaudit + raise + sopener.mustaudit = oldaudit return streamres(streamer(repo, entries, total_bytes))