Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dx EventBasic swallows exception #148

Open
zopyx opened this issue Mar 13, 2014 · 0 comments
Open

dx EventBasic swallows exception #148

zopyx opened this issue Mar 13, 2014 · 0 comments

Comments

@zopyx
Copy link
Member

zopyx commented Mar 13, 2014

The 'start' property implementation of EventBasics swallows somehow exceptions.

Accessing the start property fails internally

(Pdb) self._prepare_dt_get(self.context.start)
*** AttributeError: timezone

self.context.start is cleary a datetime instance with a timezone

(Pdb) print self.context.start.tzinfo
<plone.app.event.dx.behaviors.FakeZone object at 0x9327590>

The start property has been created as recommended in the other ticket through the behavior interface with pytz.timezone('CET').

Why is this exception swallowed and obviously somewhere transformed into None instead of dealing with the error properly? The call stack is:

/home/ajung/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py(518)do_optTag()
-> return self.no_tag(start, program)
/home/ajung/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py(513)no_tag()
-> self.interpret(program)
/home/ajung/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py(343)interpret()
-> handlers[opcode](self, args)
/home/ajung/.buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py(620)do_insertText_tal()
-> text = self.engine.evaluateText(stuff[0])
/home/ajung/.buildout/eggs/Zope2-2.13.21-py2.7.egg/Products/PageTemplates/Expressions.py(225)evaluateText()
-> text = self.evaluate(expr)
/home/ajung/.buildout/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py(696)evaluate()
-> return expression(self)
/home/ajung/.buildout/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py(217)call()
-> return self._eval(econtext)
/home/ajung/.buildout/eggs/Zope2-2.13.21-py2.7.egg/Products/PageTemplates/Expressions.py(147)_eval()
-> ob = self._subexprs-1
/home/ajung/.buildout/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py(124)_eval()
-> ob = self._traverser(ob, element, econtext)
/home/ajung/.buildout/eggs/Zope2-2.13.21-py2.7.egg/Products/PageTemplates/Expressions.py(97)trustedBoboAwareZopeTraverse()
-> request=request)
/home/ajung/.buildout/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py(136)traversePathElement()
-> return traversable.traverse(nm, further_path)
/home/ajung/.buildout/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py(42)traverse()
-> attr = getattr(subject, name, _marker)
/home/ajung/.buildout/eggs/plone.app.event-1.2-py2.7.egg/plone/app/event/dx/behaviors.py(611)getattr()
-> return safe_unicode(getattr(behavior, name, None))

/home/ajung/.buildout/eggs/plone.app.event-1.2-py2.7.egg/plone/app/event/dx/behaviors.py(347)start()
-> return None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant