[ovs-dev] [python idl 01/16] ovs.db.types: Always initialize ref_type attribute.
Ethan Jackson
ethan at nicira.com
Mon Sep 19 15:07:42 PDT 2011
Looks good,
Ethan
On Mon, Sep 19, 2011 at 11:18, Ben Pfaff <blp at nicira.com> wrote:
> The ref_type attribute was initialized on some paths but not others.
>
> Found by pychecker.
> ---
> python/ovs/db/types.py | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py
> index 4e8f8f1..8b29000 100644
> --- a/python/ovs/db/types.py
> +++ b/python/ovs/db/types.py
> @@ -113,6 +113,10 @@ class BaseType(object):
> self.min_length = min_length
> self.max_length = max_length
> self.ref_table = ref_table
> + if ref_table:
> + self.ref_type = 'strong'
> + else:
> + self.ref_type = None
>
> def default(self):
> return ovs.db.data.Atom.default(self.type)
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list