Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370365 )

Change subject: Add repr string to EventStreams
......................................................................

Add repr string to EventStreams

Change-Id: I0d571f7c9f39b848d67812128d95a21c30b019b4
---
M pywikibot/comms/eventstreams.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/65/370365/1

diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py
index 2236481..27fb566 100644
--- a/pywikibot/comms/eventstreams.py
+++ b/pywikibot/comms/eventstreams.py
@@ -69,6 +69,14 @@
         kwargs.setdefault('timeout', config.socket_timeout)
         self.sse_kwargs = kwargs
 
+    def __repr__(self):
+        """Representation string of the class."""
+        class_name = self.__class__.__name__
+        if self._stream_
+            return class_name + '(stream="{1}")'.format(self._stream)
+        else:
+            return class_name + '(url="{1}")'.format(self._url)
+
     @property
     def url(self):
         """Get the EventStream's url.

-- 
To view, visit https://gerrit.wikimedia.org/r/370365
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d571f7c9f39b848d67812128d95a21c30b019b4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to