Re: [ovs-dev] [PATCH] python: KeyError shouldn't be raised from __getattr__

2018-03-14 Thread Russell Bryant
I've applied this to master and branch-2.9. Thanks! On Mon, Mar 12, 2018 at 6:52 AM, Timothy Redaelli wrote: > On Python 3 hasattr only intercepts AttributeError exception. > On Python2, instead, hasattr intercepts all the exceptions. > > This means __getattr__ shouldn't return KeyError when the

[ovs-dev] [PATCH] python: KeyError shouldn't be raised from __getattr__

2018-03-12 Thread Timothy Redaelli
On Python 3 hasattr only intercepts AttributeError exception. On Python2, instead, hasattr intercepts all the exceptions. This means __getattr__ shouldn't return KeyError when the attribute doesn't exists, but it should raise AttributeError instead. Fixes: 2d54d8011e14 ("Python-IDL: getattr after