diff options
author | William Salmon <will.salmon@codethink.co.uk> | 2020-04-16 10:57:08 +0100 |
---|---|---|
committer | Chandan Singh <chandan@chandansingh.net> | 2020-04-27 20:07:22 +0000 |
commit | 5aa5c7c3e49e63d7e8416db1e81972fa29887ea5 (patch) | |
tree | c37a8ecd22ab7a34e4a783f65c50790ea037f2e1 | |
parent | dd29f0d5b877c89787b5ce08df51a9faf8abbcc8 (diff) | |
download | buildstream-5aa5c7c3e49e63d7e8416db1e81972fa29887ea5.tar.gz |
node.pyx: Add '__str__' to 'Node'
-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 # ############################################################# |