WIP: Improved python3 compatibility and applied flake8 fixes.
For python3 compatibility replaced:
- print by print function from future or by python logger to improve python3 compatibility,
-
except [class], [var]:
byexcept [class] as [var]:
, - raise [class],[msg] by raise class,
- octal mumbers e.g.
0755
by0o755
, -
commands.getstatusoutput
bysubprocess
based solution.
To fix flake8 warnings, replaced
- membership test:
not [val] in [dict]
by[val] not in [dict]
, -
==None
byis None
and!=None
bynot is None
, - renamed ambiguous variables.
Edited by Goetz Gaycken