diff options
author | Rob Austein <sra@hactrn.net> | 2009-05-12 03:39:37 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-05-12 03:39:37 +0000 |
commit | 48244b53cef3acef2d5e726e903ea2ec71bd2136 (patch) | |
tree | f68dcf1fba76b02fe4e9b85e11ee0a1350d9af5d /rpkid/pubd.py | |
parent | c450547374d179e4740c869f9645ed9d1e4aeb48 (diff) |
Cleanup some of the litter left behind during conversion to callbacks.
Add rpki.async.iterator.__repr__() so we can figure out where the
silly things were created when debugging. Fix sloppy child process
shutdown in testbed.main(); I don't know why this only started
complaining now, but it did, so I fixed it.
svn path=/rpkid/pubd.py; revision=2426
Diffstat (limited to 'rpkid/pubd.py')
-rwxr-xr-x | rpkid/pubd.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/rpkid/pubd.py b/rpkid/pubd.py index 5fb04dcb..1ea6f00e 100755 --- a/rpkid/pubd.py +++ b/rpkid/pubd.py @@ -65,10 +65,14 @@ class pubd_context(object): """ Process one PDU from the IRBE. """ + + def done(x): + cb(200, x) + rpki.log.trace() try: self.sql.ping() - self.handler_common(query, None, lambda x: cb(200, x), (self.bpki_ta, self.irbe_cert)) + self.handler_common(query, None, done, (self.bpki_ta, self.irbe_cert)) except rpki.async.ExitNow: raise except Exception, data: @@ -79,6 +83,11 @@ class pubd_context(object): """ Process one PDU from a client. """ + + def done(x): + cb(200, x) + + rpki.log.trace() try: self.sql.ping() @@ -91,7 +100,7 @@ class pubd_context(object): config = rpki.publication.config_elt.fetch(self) if config is None or config.bpki_crl is None: raise rpki.exceptions.CMSCRLNotSet - self.handler_common(query, client, lambda x: cb(200, x), (self.bpki_ta, client.bpki_cert, client.bpki_glue), config.bpki_crl) + self.handler_common(query, client, done, (self.bpki_ta, client.bpki_cert, client.bpki_glue), config.bpki_crl) except rpki.async.ExitNow: raise except Exception, data: |