Fix two exceptions encountered when running tests

I ran into two different exceptions when running tests,
which end up using python2.
This CL fixed them for me.

In one case, we were calling encode() on a str,
which produced an exception:
ascii' codec can't decode byte 0xe2 in position 0...

In another case, 'result' was None, so result[0]
failed.

Change-Id: I4764444303e1dbd8001f2a872c9905e3331e22f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3209653
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929246}
NOKEYCHECK=True
GitOrigin-RevId: 8c06bd21794233114ebae335c7f8abe1b6550620
1 file changed
tree: c522a3677c57a617f5b903f02a47e50ba4f782e4
  1. development/
  2. DIR_METADATA
  3. LICENSE
  4. OWNERS
  5. README.chromium