scons: Simplify the check for protoc.
authorGabe Black <gabe.black@gmail.com>
Sun, 7 Feb 2021 11:17:21 +0000 (03:17 -0800)
committerGabe Black <gabe.black@gmail.com>
Thu, 11 Feb 2021 19:33:24 +0000 (19:33 +0000)
commite69453157c31b72867bdbb11515cf21fdf63d506
tree0e21f2485b27db7cd57b07a4d76de640763eb404
parentd7df1ebabb4d109930b568a5bdffeb31e6db2a85
scons: Simplify the check for protoc.

Collapse nesting, and constrain the try/except to only the line in that
section which might actually be expected to throw an exception when
things are working normally.

This makes the code easier to read, and won't absorb and discard
exceptions which are thrown for unexpected reasons.

Change-Id: Id3ac417ab5545bef35ed8a87d05211c8ef2f5a50
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40867
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
SConstruct