diff options
author | Rob Austein <sra@hactrn.net> | 2009-04-24 23:03:51 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-04-24 23:03:51 +0000 |
commit | 8542127f3bc823bbc7ff76e4ca8dc3bd0969318f (patch) | |
tree | 7b6a4faa5b62a03d432a6fc5a7e0be431b7aa65f /rpkid/rpki/async.py | |
parent | 725bc9130dd16ffffa5277382b23cda6c069ef6c (diff) |
Checkpoint
svn path=/rpkid/pubd.py; revision=2355
Diffstat (limited to 'rpkid/rpki/async.py')
-rw-r--r-- | rpkid/rpki/async.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rpkid/rpki/async.py b/rpkid/rpki/async.py index 1c0b5a02..74a23385 100644 --- a/rpkid/rpki/async.py +++ b/rpkid/rpki/async.py @@ -18,6 +18,8 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ +import rpki.log + class iterator(object): """Iteration construct for event-driven code. Takes three arguments: @@ -39,7 +41,11 @@ class iterator(object): def __init__(self, iterable, item_callback, done_callback): self.item_callback = item_callback self.done_callback = done_callback - self.iterator = iter(iterable) + try: + self.iterator = iter(iterable) + except: + rpki.log.debug("Problem constructing iterator for %s" % repr(iterable)) + raise self() def __call__(self, *ignored): |