[PATCH 2 of 4] hgweb: all protocol functions have become generators

Dirkjan Ochtman dirkjan at ochtman.nl
Mon Jun 30 00:07:05 CDT 2008


Shun-ichi GOTO wrote:
> By this change, python 2.4 and 2.3 complains (appeared on "python
> setup.py py2exe -b 3"):
> 
> error: compiling 'build\lib.win32-2.4\mercurial\hgweb\protocol.py' failed
>     SyntaxError: 'yield' not allowed in a 'try' block with a 'finally'
> clause (protocol.py, line 146)
> 
> # It's OK with python 2.5

Thanks for reporting this. I remember thinking I should test this with 
Python 2.3, since it makes a lot of use of yield.

I think I'll just return a one-element tuple from unbundle, since it 
only returns a short status code anyway.

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list