aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-08-31 19:24:16 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-09-01 15:42:39 -0400
commit10cfc321f8c47d86a6039ddc3f0429f34bf68bf8 (patch)
treed3cbf081d3f6235440a9f895619eb43c83fe3f27
parent0b63dff3badf4f728d5dadda81dbef8de67ba164 (diff)
downloadmeson-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.py4
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