python3: Fix traceback while running tests.

Fix the following traceback while runing with
python3:

NameError: free variable 'section' referenced before assignment in enclosing scope

Change-Id: I1792aef16dcc170ce261c4d4079742b9125e5b84
Signed-off-by: Chuck Short <chuck.short@canonical.com>