diff options
author | Rob Austein <sra@hactrn.net> | 2010-02-17 09:48:49 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-02-17 09:48:49 +0000 |
commit | 3c73588e50b92a77af22348f11c2019540d620f5 (patch) | |
tree | 83857744221e62089ecd1b4057be80fa2508585c /rpkid/rpki/async.py | |
parent | ffe4a5168896040a174c5f932f050c34470fb4ec (diff) |
Debugging cleanup
svn path=/rpkid/rpki/async.py; revision=2976
Diffstat (limited to 'rpkid/rpki/async.py')
-rw-r--r-- | rpkid/rpki/async.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rpkid/rpki/async.py b/rpkid/rpki/async.py index 49152527..23f2c1ce 100644 --- a/rpkid/rpki/async.py +++ b/rpkid/rpki/async.py @@ -110,7 +110,8 @@ class timer(object): if errback is not None: self.set_errback(errback) self.when = None - self.trace("Creating %r" % self) + if self.gc_debug: + self.trace("Creating %r" % self) def trace(self, msg): """ @@ -125,7 +126,8 @@ class timer(object): Set a timer. Argument can be a datetime, to specify an absolute time, or a timedelta, to specify an offset time. """ - self.trace("Setting %r to %r" % (self, when)) + if self.gc_debug: + self.trace("Setting %r to %r" % (self, when)) if isinstance(when, rpki.sundial.timedelta): self.when = rpki.sundial.now() + when else: @@ -146,7 +148,8 @@ class timer(object): """ Cancel a timer, if it was set. """ - self.trace("Canceling %r" % self) + if self.gc_debug: + self.trace("Canceling %r" % self) try: self.queue.remove(self) except ValueError: |