diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-09-10 20:03:23 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-09-11 14:08:23 +0900 |
commit | 76590aa4080d125084a110a496505d485ef75ceb (patch) | |
tree | fdca6c3ba041fa47c85529072c258e392f206d49 /example.py | |
parent | 424ed8f54b4360f1609c4c032b793add74fb5bd3 (diff) | |
download | pygerrit-76590aa4080d125084a110a496505d485ef75ceb.tar.gz |
Add __repr__ methods on event and model classes
This gives more meaningful output when doing:
print(event)
and means it's not necessary to use str(event).
Change-Id: I3c1546ab89c481bec24fbc4445ed7f33aa05eff8
Diffstat (limited to 'example.py')
-rwxr-xr-x | example.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -71,7 +71,7 @@ def _main(): event = gerrit.get_event(block=options.blocking, timeout=options.timeout) if event: - logging.info("Event: %s", str(event)) + logging.info("Event: %s", event) if isinstance(event, GerritStreamErrorEvent): logging.error(event.error) errors.set() |