git-rebase-update: Make tests run on Python 3.

Bug: 1009809
Change-Id: I47c9a468b2922248b823ebae5e71863a698c30f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1889166
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/git_new_branch.py b/git_new_branch.py
index d61a42d..856b6ea 100755
--- a/git_new_branch.py
+++ b/git_new_branch.py
@@ -61,8 +61,8 @@
         run('checkout', '--track', opts.upstream, '-b', opts.branch_name)
     get_or_create_merge_base(opts.branch_name)
   except subprocess2.CalledProcessError as cpe:
-    sys.stdout.write(cpe.stdout)
-    sys.stderr.write(cpe.stderr)
+    sys.stdout.write(cpe.stdout.decode('utf-8', 'replace'))
+    sys.stderr.write(cpe.stderr.decode('utf-8', 'replace'))
     return 1
   sys.stderr.write('Switched to branch %s.\n' % opts.branch_name)
   return 0