remove locals() for stringformat

When renames variable, locals() brings bug.

Change-Id: I273ca9f71c0f4d37354bd90a43ce758baf2aeebe
Merge "remove locals() for stringformat"