code cleanup to comply with pep8 and enable static code analysis, passes flake8 check now.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>