emesene/emesene — Issue #1021: code cleanup
Author: pepeleproso
Created: 2012-02-20 14:48:43+00:00
State: open
Labels: easy

Adding this so it don't get lost

someone wants to help emesene?
https://github.com/emesene/emesene/blob/master/emesene/e3/common/Signal.py#L109
change "== None" for "is None" there
another one
https://github.com/emesene/emesene/blob/master/emesene/e3/common/Signal.py#L126
change that try/except for an if using hasattr
exceptions are costly and are only for exceptional things
➜ emesene git:(master) grep -R "== None" * | wc -l
21
you have 21 fixes like the first one I described
go!
another one like the second: https://github.com/emesene/emesene/blob/master/emesene/e3/common/OrderedDict.py#L30
another one: https://github.com/emesene/emesene/blob/master/emesene/e3/common/DBus.py#L86
just grep -R AttributeError * and have fun
another one grep -R "except:" *
remove those, catch the specific exception
I'll add a new bug about this
and no, Exception isn't specific :)