svn commit: r1922639 - /subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: dsahlberg
Date: Sun Dec 22 20:23:53 2024
New Revision: 1922639

URL: http://svn.apache.org/viewvc?rev=1922639&view=rev
Log:
Add a __repr__ function to allow repr() a Notification (used for a debugging client).

* tools/server-side/svnpubsub/svnpubsub/client.py
  (Notifications): Add __repr__

Suggested by: jun66j5


Modified:
    subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py

Modified: subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py?rev=1922639&r1=1922638&r2=1922639&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py (original)
+++ subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py Sun Dec 22 20:23:53 2024
@@ -131,6 +131,8 @@ class Client(asynchat.async_chat):
 class Notification(object):
   def __init__(self, data):
     self.__dict__.update(data)
+  def __repr__(self):
+    return '%s(%r)' % (self.KIND, self.__dict__)
 
 class Commit(Notification):
   KIND = 'COMMIT'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.