Fix some python issues introduced by wip-disk-list

Fixes for:
- bad indention
- missing spaces around '=' operator
- Redefining names from outer scope
- Catching too general exception Exception
- Redefining built-in 'type'