Commit 017bcf67 authored by Michael Moss's avatar Michael Moss Committed by Commit Bot

Fix flattened hooks_os list formatting.

R=dpranke@chromium.org, phajdan.jr@chromium.org

Bug: 570091
Change-Id: Ic2aa1a9fe18f3fe8d5aa6fa4c4e9269106b36092
Reviewed-on: https://chromium-review.googlesource.com/553719
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: 's avatarDi Mu <dimu@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: 's avatarPaweł Hajdan Jr. <phajdan.jr@chromium.org>
parent 844cf296
...@@ -1944,7 +1944,7 @@ def _HooksOsToLines(hooks_os): ...@@ -1944,7 +1944,7 @@ def _HooksOsToLines(hooks_os):
"""Converts |hooks| list to list of lines for output.""" """Converts |hooks| list to list of lines for output."""
s = ['hooks_os = {'] s = ['hooks_os = {']
for hook_os, os_hooks in hooks_os.iteritems(): for hook_os, os_hooks in hooks_os.iteritems():
s.append(' "%s": {' % hook_os) s.append(' "%s": [' % hook_os)
for dep, hook in os_hooks: for dep, hook in os_hooks:
s.extend([ s.extend([
' # %s' % dep.hierarchy(include_url=False), ' # %s' % dep.hierarchy(include_url=False),
...@@ -1961,7 +1961,7 @@ def _HooksOsToLines(hooks_os): ...@@ -1961,7 +1961,7 @@ def _HooksOsToLines(hooks_os):
[' "%s",' % arg for arg in hook.action] + [' "%s",' % arg for arg in hook.action] +
[' ]', ' },', ''] [' ]', ' },', '']
) )
s.extend([' },', '']) s.extend([' ],', ''])
s.extend(['}', '']) s.extend(['}', ''])
return s return s
......
...@@ -663,7 +663,7 @@ class GClientSmokeGIT(GClientSmokeBase): ...@@ -663,7 +663,7 @@ class GClientSmokeGIT(GClientSmokeBase):
']', ']',
'', '',
'hooks_os = {', 'hooks_os = {',
' "mac": {', ' "mac": [',
' # src', ' # src',
' {', ' {',
' "pattern": ".",', ' "pattern": ".",',
...@@ -676,7 +676,7 @@ class GClientSmokeGIT(GClientSmokeBase): ...@@ -676,7 +676,7 @@ class GClientSmokeGIT(GClientSmokeBase):
' ]', ' ]',
' },', ' },',
'', '',
' },', ' ],',
'', '',
'}', '}',
'', '',
......
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