diff options
author | William Salmon <will.salmon@codethink.co.uk> | 2020-04-16 10:57:08 +0100 |
---|---|---|
committer | William Salmon <will.salmon@codethink.co.uk> | 2020-04-23 14:25:53 +0000 |
commit | bb6c6ecb3ebcf49fb8b40fe44008b27e05e3022a (patch) | |
tree | a73e2a0b6cd2b23194a54c6c653d736bb612cec9 | |
parent | b853d9a2a157e3c6db349ae54d080bfff06a7664 (diff) | |
download | buildstream-willsalmon/more_as_str.tar.gz |
node.pyx: Add '__str__' to 'Node'willsalmon/more_as_str
-rw-r--r-- | src/buildstream/node.pyx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildstream/node.pyx b/src/buildstream/node.pyx index e33a11753..ea61d9366 100644 --- a/src/buildstream/node.pyx +++ b/src/buildstream/node.pyx @@ -90,6 +90,9 @@ cdef class Node: def __json__(self): raise ValueError("Nodes should not be allowed when jsonify-ing data", self) + def __str__(self): + return "{}: {}".format(self.get_provenance(), self.strip_node_info()) + ############################################################# # Abstract Public Methods # ############################################################# |