From d628b590f2775e4e69e7625fecbb9dc05f0d13a2 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Tue, 29 Nov 2016 11:55:52 -0800 Subject: [PATCH] Provide __str__ method for Topic and Link When doing an #undo operation have the message be more helpful. Before it would do an output like: Removing item from minutes: Now it will output something like: Removing item from minutes: #link http://www.openstack.org/ Change-Id: I925ef47798eb9a86dc3dd35bb4e3601b4b70a08b --- ircmeeting/items.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ircmeeting/items.py b/ircmeeting/items.py index 38b9972..6631ae3 100644 --- a/ircmeeting/items.py +++ b/ircmeeting/items.py @@ -155,6 +155,8 @@ class Topic(_BaseItem): def mw(self, M): repl = self.get_replacements(M, escapewith=writers.mw) return self.mw_template%repl + def __str__(self): + return "#topic %s" % self.topic class GenericItem(_BaseItem): itemtype = '' @@ -290,5 +292,7 @@ class Link(_BaseItem): def mw(self, M): repl = self.get_replacements(M, escapewith=writers.mw) return self.mw_template%repl + def __str__(self): + return "#link %s" % self.url class Vote(GenericItem): itemtype = 'VOTE'