Commit 5c9afa6d authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

Fix list unpacking in wpt-import's test_importer.

Follow-up to commit 4a301c5f ("Remove the
--allow-local-commits flag from wpt-import"), which broke wpt imports:

Traceback (most recent call last):
  File "/mnt/data/b/rr/tmpFlAgpq/w/src/third_party/WebKit/Tools/Scripts/wpt-import", line 18, in <module>
    host.exit(importer.main())
  File "/mnt/data/b/rr/tmpFlAgpq/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 55, in main
    if not self.checkout_is_okay():
  File "/mnt/data/b/rr/tmpFlAgpq/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 230, in checkout_is_okay
    ['git', 'log', '--oneline', 'origin/master..HEAD'])[1]
ValueError: need more than 0 values to unpack

(from https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/346)

Tbr: qyearsley@chromium.org
Change-Id: Ic5849c25add80048d4e1e9f1c573031537243ff0
Reviewed-on: https://chromium-review.googlesource.com/579069
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarRaphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#488188}
parent e33acc28
......@@ -227,7 +227,7 @@ class TestImporter(object):
_log.warning('Checkout is dirty; aborting.')
return False
_, local_commits = self.run(
['git', 'log', '--oneline', 'origin/master..HEAD'])[1]
['git', 'log', '--oneline', 'origin/master..HEAD'])
if local_commits:
_log.warning('Checkout has local commits before import.')
return True
......
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