ferleal / pytuio

Automatically exported from code.google.com/p/pytuio
MIT License
0 stars 0 forks source link

AttributeError eaten #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. write an application in the style of example3
2. have a typo in an attribute access (eg. seelf.naem instead of self.name)
3. run the example

What is the expected output? What do you see instead?

the exception gets ignored silently

What version of the product are you using? On what operating system?

svn version 16

Please provide any additional information below.

there are two cases of `except AttributeError: pass` in __init__.py. this is 
bad practice in general, but a severe problem when used around a callback. 
instead, the questionable attribute accesses should use getattr(object, "name", 
default_value) or wrapped much more tightly in try/except blocks.

Original issue reported on code.google.com by chr...@fsfe.org on 4 Sep 2013 at 2:29