From bd6f46e723813dfadaba1f7c87d3b0b751d05219 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 4 Jul 2021 19:18:28 -0400 Subject: condense lines --- mesonbuild/mesonlib/universal.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mesonbuild/mesonlib') diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index d57c3e8..17f604d 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -330,11 +330,9 @@ class FileMode: return -1 eg = 'rwxr-xr-x' if not isinstance(perms_s, str): - msg = f'Install perms must be a string. For example, {eg!r}' - raise MesonException(msg) + raise MesonException(f'Install perms must be a string. For example, {eg!r}') if len(perms_s) != 9 or not cls.symbolic_perms_regex.match(perms_s): - msg = f'File perms {perms_s!r} must be exactly 9 chars. For example, {eg!r}' - raise MesonException(msg) + raise MesonException(f'File perms {perms_s!r} must be exactly 9 chars. For example, {eg!r}') perms = 0 # Owner perms if perms_s[0] == 'r': @@ -1451,8 +1449,7 @@ def _substitute_values_check_errors(command: T.List[str], values: T.Dict[str, st # Error out if any input-derived templates are present in the command match = iter_regexin_iter(inregex, command) if match: - m = f'Command cannot have {match!r}, since no input files were specified' - raise MesonException(m) + raise MesonException(f'Command cannot have {match!r}, since no input files were specified') else: if len(values['@INPUT@']) > 1: # Error out if @PLAINNAME@ or @BASENAME@ is present in the command -- cgit v1.1