Comment 1 for bug 625896

Revision history for this message
xrg (xrg) wrote : Re: [Bug 625896] [NEW] exception if fields.py if no _context

On Saturday 28 August 2010, you wrote:
> I made this change some time ago, and no longer have the traceback.
> context = context.copy()
> - context.update(self._context)
> + try:
> + context.update(self._context)
> + except:
> + pass
> if not values:
> values = {}
>

Just a remark of Pythonic twist:

*Please, avoid catching with "except:", but use "except Exception:" instead. *

The reason is that the first would catch KeyboardInterrupt and SystemExit,
which should never be handled in code like that.