Do not use locals() for string formatting

Change-Id: I48bd6136308888128e0c880c451f702332480a02