Mercurial > hg-stable
diff mercurial/wireproto.py @ 17603:a7fa5bd1c914
wireproto: workaround for yield inside try/finally incompatible with python2.4
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 18 Sep 2012 17:00:58 +0200 |
parents | 2ee7281e5aaa |
children | 8474be4412ca |
line wrap: on
line diff
--- a/mercurial/wireproto.py Tue Sep 18 15:36:58 2012 +0200 +++ b/mercurial/wireproto.py Tue Sep 18 17:00:58 2012 +0200 @@ -567,8 +567,11 @@ 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))