Fixing hacky exception handling and bug in import fixer
Hacky exception handling by investigating the exception's class it not necessary anymore.
A bug in the ImportFixer
reported by Kasra that happens with aliased imports (import something as something_else
, for example) was fixed too and a test added to cover this case.
This MR fixes bugs:
- https://nexedi.erp5.net/bug_module/20160708-166C255
- https://nexedi.erp5.net/bug_module/20160708-1270DEA
@Tyagov, please review when you can.