Commit 67c48200 authored by Eric Boren's avatar Eric Boren Committed by Commit Bot

[git-cl] Fix crash in "git cl upload"

This occurs when the command is run on autorollers.

Change-Id: I264b85e906617412538b333b06414479b4acc386
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1637360Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Eric Boren <borenet@chromium.org>
parent 9779b146
......@@ -2552,7 +2552,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
git_info_zip = trace_name + '-git-info'
git_push_metadata['now'] = datetime_now().strftime('%c')
if sys.stdin.encoding != 'utf-8':
if sys.stdin.encoding and sys.stdin.encoding != 'utf-8':
git_push_metadata['now'] = git_push_metadata['now'].decode(
sys.stdin.encoding)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment