1. Fix a potential getattr failure (noticed by delphij).
2. Remove unnecessary try-except-raise logic. 3. Be consistent and use f is None, instead of not f, even though both constructs are usable (for most intents and purposes).
Authored by: yaberauneya 2011-08-17
Parent: [r7223]
Child: [r7225]