Fix git cl comments when there's no issue associated with the current branch.

It currently crashes, which is sad.

R=pgervais@chromium.org
BUG=

Review URL: https://codereview.chromium.org/683283006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292899 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
maruel@chromium.org 11 years ago
parent 45cddd6569
commit 5cab2d37e3

@ -1462,7 +1462,7 @@ def CMDcomments(parser, args):
return 0
data = cl.GetIssueProperties()
for message in sorted(data['messages'], key=lambda x: x['date']):
for message in sorted(data.get('messages', []), key=lambda x: x['date']):
if message['disapproval']:
color = Fore.RED
elif message['approval']:

Loading…
Cancel
Save