From: Ben Pfaff Date: Thu, 15 Sep 2011 19:59:31 +0000 (-0700) Subject: ovs.db.data: Make Datum.check_constraints() work. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e4f0157eca83b64b4c21380c5788274d48bff78;p=openvswitch ovs.db.data: Make Datum.check_constraints() work. This code never got tested and so didn't work. This does not fix an actual bug because Datum.check_constraints() does not have any existing users. --- diff --git a/python/ovs/db/data.py b/python/ovs/db/data.py index f62a562d..c07d8bfd 100644 --- a/python/ovs/db/data.py +++ b/python/ovs/db/data.py @@ -264,10 +264,10 @@ class Datum(object): This function is not commonly useful because the most ordinary way to obtain a datum is ultimately via Datum.from_json() or Atom.from_json(), which check constraints themselves.""" - for keyAtom, valueAtom in self.values: - keyAtom.check_constraints() + for keyAtom, valueAtom in self.values.iteritems(): + keyAtom.check_constraints(self.type.key) if valueAtom is not None: - valueAtom.check_constraints() + valueAtom.check_constraints(self.type.value) @staticmethod def from_json(type_, json, symtab=None):