diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-08-31 19:24:16 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-09-01 15:42:39 -0400 |
commit | 10cfc321f8c47d86a6039ddc3f0429f34bf68bf8 (patch) | |
tree | d3cbf081d3f6235440a9f895619eb43c83fe3f27 | |
parent | 0b63dff3badf4f728d5dadda81dbef8de67ba164 (diff) | |
download | meson-10cfc321f8c47d86a6039ddc3f0429f34bf68bf8.zip meson-10cfc321f8c47d86a6039ddc3f0429f34bf68bf8.tar.gz meson-10cfc321f8c47d86a6039ddc3f0429f34bf68bf8.tar.bz2 |
fix repr for alias_target
It has no command, so you cannot try printing it or it explodes with
IndexError: list index out of range
-rw-r--r-- | mesonbuild/build.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index c6a6994..b0863cd 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2528,6 +2528,10 @@ class AliasTarget(RunTarget): def __init__(self, name, dependencies, subdir, subproject): super().__init__(name, [], dependencies, subdir, subproject) + def __repr__(self): + repr_str = "<{0} {1}>" + return repr_str.format(self.__class__.__name__, self.get_id()) + class Jar(BuildTarget): known_kwargs = known_jar_kwargs |