Do not use the '+' operation dict_items()

This operation is undefined in Python3, list() must be called first.

Change-Id: I764ee994b5faf0e6783e4025466e6ceb17fe3642
Only call decode() on bytes

In Python 3, text strings are not bytes, so the decode() method should not be
called on them.

Change-Id: I081c6a93daa86586378a15d8ae98738c41bda8d0
Merge "Do not use the '+' operation dict_items()"
Merge "Only call decode() on bytes"