--- a/objdictgen/eds_utils.py Wed Jun 13 19:08:58 2012 +0200
+++ b/objdictgen/eds_utils.py Fri Jun 15 18:24:26 2012 +0200
@@ -323,7 +323,7 @@
# verify that there is no whitespace into keyname
if keyname.isalnum():
# value can be preceded and followed by whitespaces, so we escape them
- value = value.strip()
+ value = value.strip().replace(" ", "")
# First case, value starts with "$NODEID", then it's a formula
if value.upper().startswith("$NODEID"):
try:
@@ -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)
+ missing = required.difference(keys)._data.keys()
if len(missing) > 1:
attributes = _("Attributes %s are")%_(", ").join(["\"%s\""%attribute for attribute in missing])
else:
- attributes = _("Attribute \"%s\" is")%missing.pop()
+ attributes = _("Attribute \"%s\" is")%missing[0]
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)
+ unsupported = keys.difference(possible)._data.keys()
if len(unsupported) > 1:
attributes = _("Attributes %s are")%_(", ").join(["\"%s\""%attribute for attribute in unsupported])
else:
- attributes = _("Attribute \"%s\" is")%unsupported.pop()
+ attributes = _("Attribute \"%s\" is")%unsupported[0]
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")