Raise an exception when cros flash is provided with an invalid version

As 'Latest-YYYY.X.X' may not map to the exact version 'RX-YYYY.X.X',
it may map to a previous stable version 'RZ-ZZZZ.X.X'. When users want
to run cros flash on the very version 'RX-YYYY.X.X', they should provide
the fully qualified version number with a prefix 'RX'; otherwise, an
exception should be raised.

BUG=chromium:585914
TEST=locally run cros flash

Change-Id: I8cf7f8d838433a43065edce483798d09b29f8eb8
Reviewed-on: https://chromium-review.googlesource.com/340349
Commit-Ready: Ningning Xia <[email protected]>
Tested-by: Ningning Xia <[email protected]>
Reviewed-by: Ningning Xia <[email protected]>
1 file changed