collective / rapido.core

2 stars 2 forks source link

Need nicer error when you miss space after type: #17

Open djay opened 8 years ago

djay commented 8 years ago

blocks yaml of

elements:
    bots:
      type:BASIC

results in

Traceback (most recent call last):
  File "/Users/dylanjay/Projects/download-cache/eggs/plone.subrequest-1.6.11-py2.7.egg/plone/subrequest/__init__.py", line 145, in subrequest
    bind=1)
  File "/Users/dylanjay/Projects/download-cache/eggs/Zope2-2.13.23-py2.7.egg/ZPublisher/mapply.py", line 78, in mapply
    else: return object(*args)
  File "/Users/dylanjay/Projects/sandpit/presentations/src/rapido.plone/src/rapido/plone/browser/views.py", line 125, in __call__
    result = self.content()
  File "/Users/dylanjay/Projects/sandpit/presentations/src/rapido.plone/src/rapido/plone/browser/views.py", line 58, in content
    (result, redirect) = method(path, self.request)
  File "/Users/dylanjay/Projects/sandpit/presentations/src/rapido.core/rapido/core/display.py", line 30, in GET
    block = self.app.get_block(obj_id)
  File "/Users/dylanjay/Projects/sandpit/presentations/src/rapido.core/rapido/core/app.py", line 94, in get_block
    self._blocks[block_id] = Block(block_id, self)
  File "/Users/dylanjay/Projects/sandpit/presentations/src/rapido.core/rapido/core/block.py", line 82, in __init__
    if (self.settings['elements'][element].get('index_type', None)
AttributeError: 'str' object has no attribute 'get'