[ovs-dev] [python 02/31] ovs.db.data: Fix bugs in Atom.is_default() and Datum.is_default().
Ben Pfaff
blp at nicira.com
Wed Aug 24 18:57:36 UTC 2011
On Wed, Aug 24, 2011 at 12:06:17AM -0700, Reid Price wrote:
> On Tue, Aug 23, 2011 at 2:04 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> > Reported-by: Reid Price <reid at nicira.com>
> > ---
> > python/ovs/db/data.py | 3 +--
> > 1 files changed, 1 insertions(+), 2 deletions(-)
> >
> > diff --git a/python/ovs/db/data.py b/python/ovs/db/data.py
> > index bfdc11c..a5fcb76 100644
> > --- a/python/ovs/db/data.py
> > +++ b/python/ovs/db/data.py
> > @@ -89,7 +89,7 @@ class Atom(object):
> > return Atom(type)
> >
> > def is_default(self):
> > - return self == default(self.type)
> > + return self == self.default(self.type)
> >
> > @staticmethod
> > def from_json(base, json, symtab=None):
> > @@ -259,7 +259,6 @@ class Datum(object):
> > values = {type.key.default(): None}
> > return Datum(type, values)
> >
> >
>
> > - @staticmethod
> > def is_default(self):
> > return self == default(self.type)
> >
> This one wants a
> s/default/self.default/
> too
Thanks.
I actually used Datum.default to make it clear that it's a static
method.
More information about the dev
mailing list