White space lint issues.
Fix `NameError`.
Remove last empty line
Remove trailing white-space.
Rename internal `envs` in order not to hide the method.
Fix variable naming issues and catch proper exceptions.
Fix white-space lint issues.
Fix white-space lint issues.
Remove trailing white-space
Merge pull request #9079 from s0undt3ch/develop

Fix lint issues.