# HG changeset patch # User Laurent Bessard # Date 1367997299 -7200 # Node ID 8aefbd0d39fffe14007d8db3a37a5d354c0c7460 # Parent 376563111c550b79d7e8606a32c5f800fe956e1c Fixed set usage in eds_utils diff -r 376563111c55 -r 8aefbd0d39ff objdictgen/eds_utils.py --- a/objdictgen/eds_utils.py Fri May 03 10:18:35 2013 +0200 +++ b/objdictgen/eds_utils.py Wed May 08 09:14:59 2013 +0200 @@ -379,19 +379,19 @@ required = set(ENTRY_TYPES[values["OBJECTTYPE"]]["require"]) # Verify that parameters defined contains all the parameters required if not keys.issuperset(required): - missing = required.difference(keys)._data.keys() + missing = required.difference(keys) if len(missing) > 1: attributes = _("Attributes %s are")%_(", ").join(["\"%s\""%attribute for attribute in missing]) else: - attributes = _("Attribute \"%s\" is")%missing[0] + attributes = _("Attribute \"%s\" is")%missing.pop() raise SyntaxError, _("Error on section \"[%s]\":\n%s required for a %s entry")%(section_name, attributes, ENTRY_TYPES[values["OBJECTTYPE"]]["name"]) # Verify that parameters defined are all in the possible parameters if not keys.issubset(possible): - unsupported = keys.difference(possible)._data.keys() + unsupported = keys.difference(possible) if len(unsupported) > 1: attributes = _("Attributes %s are")%_(", ").join(["\"%s\""%attribute for attribute in unsupported]) else: - attributes = _("Attribute \"%s\" is")%unsupported[0] + attributes = _("Attribute \"%s\" is")%unsupported.pop() raise SyntaxError, _("Error on section \"[%s]\":\n%s unsupported for a %s entry")%(section_name, attributes, ENTRY_TYPES[values["OBJECTTYPE"]]["name"]) VerifyValue(values, section_name, "ParameterValue")