mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[git_number] Improve error message on parse_commitrefs
We are observing "binascii.Error: Non-hexadecimal digit found" on LUCI, but it's not reproducible on local env. This change also triggers the recipe roller. R=gavinmak@google.com Bug: 1514645 Change-Id: I4b97c4593b117d145f8304069d569607033babbe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5160257 Commit-Queue: Josip Sokcevic <sokcevic@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
@@ -682,10 +682,14 @@ def parse_commitrefs(*commitrefs):
|
||||
* 'origin/main'
|
||||
* 'cool_branch~2'
|
||||
"""
|
||||
hashes = []
|
||||
try:
|
||||
return [binascii.unhexlify(h) for h in hash_multi(*commitrefs)]
|
||||
hashes = hash_multi(*commitrefs)
|
||||
return [binascii.unhexlify(h) for h in hashes]
|
||||
except subprocess2.CalledProcessError:
|
||||
raise BadCommitRefException(commitrefs)
|
||||
except binascii.Error as e:
|
||||
raise binascii.Error(f'{e}. Invalid hashes are {hashes}')
|
||||
|
||||
|
||||
RebaseRet = collections.namedtuple('RebaseRet', 'success stdout stderr')
|
||||
|
||||
@@ -10,3 +10,4 @@ a new friend, but this information was marked RVG, so it was months before
|
||||
any details were revealed.
|
||||
|
||||
The End!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user