Fix python3.x scoping issues with removed 'uee' variable

In python3.x the 'uee' variable will be removed from the
scope after the except block exits (if it ever is entered)
so we need to use a different variable name to ensure that
it will not be deleted so we can use it later.

Change-Id: Ia86a2bd1a46e57eaf47704eadc991fd0c9b08661