summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-09-20 19:10:34 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-09-22 16:30:01 -0700
commit673fbe0d71316d3f1a11467bc7995c18e3a91878 (patch)
treecaa54b8e0ad66d64a758bc81c8428ead662fe19e /extra
parentc98ea9a60abaa3bf3a4ca96e0c047e7512e6ec2f (diff)
downloadchrome-ec-673fbe0d71316d3f1a11467bc7995c18e3a91878.tar.gz
servo_updater: account for versions starting with v2
With resent base tag update the hardcoded version number pattern in servo_updater.py needs to be adjusted. BRANCH=none BUG=b:112475211 TEST=TBD Change-Id: If3b18f563ff48eb98db95864d8f2298ead04495d Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1237714 Reviewed-by: Nick Sanders <nsanders@chromium.org>
Diffstat (limited to 'extra')
-rwxr-xr-xextra/usb_updater/servo_updater.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/extra/usb_updater/servo_updater.py b/extra/usb_updater/servo_updater.py
index 82d2abd88d..18d25130dd 100755
--- a/extra/usb_updater/servo_updater.py
+++ b/extra/usb_updater/servo_updater.py
@@ -128,11 +128,14 @@ def do_updater_version(vidpid, iface, serialno):
"""
vers = do_version(vidpid, iface, serialno)
- m = re.search('_v1.1.(\d\d\d\d)', vers)
+ # Servo versions below 58 are from servo-9040.B. Versions starting with _v2
+ # are newer than anything _v1, no need to check the exact number. Updater
+ # version is not directly queryable.
+ if re.search('_v[2-9]\.\d', vers):
+ return 6
+ m = re.search('_v1\.1\.(\d\d\d\d)', vers)
if m:
version_number = int(m.group(1))
- # Servo versions below 58 are from servo-9040.B.
- # Updater version is not directly queryable.
if version_number < 5800:
return 2
else: