Commit 1824ef1f authored by sfiera's avatar sfiera Committed by Commit bot

ntp_snippets: fix ./fetch.py --short

When I broke out a function, I mixed up the request and the JSON for the
argument.

Review-Url: https://codereview.chromium.org/2849763003
Cr-Commit-Position: refs/heads/master@{#467982}
parent 42dd78c5
...@@ -195,9 +195,9 @@ def Authenticate(args, headers, client_id, client_secret): ...@@ -195,9 +195,9 @@ def Authenticate(args, headers, client_id, client_secret):
creds.apply(headers) creds.apply(headers)
def PrintShortResponse(r): def PrintShortResponse(j):
now = datetime.datetime.now() now = datetime.datetime.now()
for category in r.json()["categories"]: for category in j["categories"]:
print("%s: " % category["localizedTitle"]) print("%s: " % category["localizedTitle"])
for suggestion in category["suggestions"]: for suggestion in category["suggestions"]:
attribution = suggestion["attribution"] attribution = suggestion["attribution"]
......
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