Fix config parser different behavior between python versions.
Also fix pylint warnings
Story: 2006796
Task: 42589
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I42ce873a86d38900d433a28c72b328950c3e078d
(cherry picked from commit 0bf05fafc7)