Singlethreading patch series

Johannes Stezenbach js at sig21.net
Mon Jan 10 11:08:34 GMT 2011


On Mon, Jan 10, 2011 at 11:00:17AM +0100, Sebastian Spaeth wrote:
> 
> I split the patches to be smaller and more self-contained and improved
> the commit messages. While I had to touch the one "except:" part in
> LocalStatus.py that we previously talked about, I decided to do
> completely away with the Exception catching. Even catching
> EnvironmentErrors as Johannes had suggested seems to much. If there is
> an IOError or OSError when os.fsyncing() our status data base something
> is really wrong and fishy and we should loudly complain rather than
> silently ignore it.

While it is true that catching EnvironmentError would also
catch IOErrors from fsync(), it would both fix your issue
with KeyboardInterrupt *and* improve the current situation
(no tracebacks and not aborting even for software bugs).
Maybe it would be better (and suffcient wrt the intentions of
the patch which introduced it) to only catch socket.error?

IMHO your patches 1...3 do not fix the no-traceback issue
(leaving the catch-all except: + self.ui.warn in place),
and litter the code with KeyboardInterrupt special handling.
I would argue that catch-all except: is almost always a bug,
and if you fix that we'd end up with a much better patch.


Johannes




More information about the OfflineIMAP-project mailing list