Skip to content

Commit

Permalink
Add a __repr__ function to allow repr() a Notification (used for a de…
Browse files Browse the repository at this point in the history
…bugging client).

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

Suggested by: jun66j5



git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1922639 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dsahlberg-apache-org committed Dec 22, 2024
1 parent 24438e2 commit d460007
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/server-side/svnpubsub/svnpubsub/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def collect_incoming_data(self, data):
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'
Expand Down

0 comments on commit d460007

Please sign in to comment.