[Telepathy-commits] [telepathy-spec/master] specparser: raise error when things without an array_name are in arrays
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Mar 20 08:52:28 PDT 2009
---
tools/specparser.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/specparser.py b/tools/specparser.py
index a2a6809..6b2dd9a 100644
--- a/tools/specparser.py
+++ b/tools/specparser.py
@@ -34,6 +34,7 @@ class UnknownDirection(Exception): pass
class UnknownType(Exception): pass
class UnnamedItem(Exception): pass
class UntypedItem(Exception): pass
+class UnsupportedArray(Exception): pass
def getText(dom):
try:
@@ -442,9 +443,8 @@ class DBusList(object):
self.depth = 1
if self.child.array_name == '':
- # FIXME: is not having an array_name an error?
- self.name = self.child.name + '_List'
- self.short_name = self.child.short_name + '_List'
+ raise UnsupportedArray("Type '%s' does not support being "
+ "used in an array" % self.child.name)
else:
self.name = build_name(self.child.namespace,
self.child.array_name)
--
1.5.6.5
More information about the telepathy-commits
mailing list