tools: fix triple shorthand error printing

The format string wasn't actually formatted, so it just printed out the
literal "{shorthand}" string in the error message.

BUG=None
TEST=tools/run_tests --target=host --build-target=bogus

Change-Id: Idad47064db3112a37df3a630b92a4a4da8da82de
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3750069
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Daniel Verkamp 2022-07-06 17:58:19 -07:00 committed by Chromeos LUCI
parent cd9f1cc7a9
commit fa0dd194c1

View file

@ -1,6 +1,7 @@
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file # found in the LICENSE file.
import argparse import argparse
import functools import functools
import platform import platform
@ -140,7 +141,7 @@ class Triple(NamedTuple):
elif shorthand == "x86_64": elif shorthand == "x86_64":
triple = "x86_64-unknown-linux-gnu" triple = "x86_64-unknown-linux-gnu"
else: else:
raise Exception("Not a valid build triple shorthand: {shorthand}") raise Exception(f"Not a valid build triple shorthand: {shorthand}")
return cls.from_str(triple) return cls.from_str(triple)
@classmethod @classmethod