[ovs-git] [openvswitch/ovs] 685e69: python: KeyError shouldn't be raised from __getatt...

GitHub noreply at github.com
Wed Mar 14 15:34:16 UTC 2018

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 685e6983c69f3cc3427e4fe9c2db39c667ce01f1
  Author: Timothy Redaelli <tredaelli at redhat.com>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M python/ovs/db/idl.py

  Log Message:
  python: KeyError shouldn't be raised from __getattr__

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 mutate fix")
Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
Signed-off-by: Russell Bryant <russell at ovn.org>

More information about the git mailing list