From: Fredrik Tolf Date: Wed, 1 Feb 2017 04:02:22 +0000 (+0100) Subject: python3: To be safe, abort entirely if initial epoller registration fails. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=c26129cd537a8086d5a9d538ffb3ba2775b619d5;p=ashd.git python3: To be safe, abort entirely if initial epoller registration fails. --- diff --git a/python3/ashd/async.py b/python3/ashd/async.py index 99da89a..aa52af9 100644 --- a/python3/ashd/async.py +++ b/python3/ashd/async.py @@ -54,8 +54,12 @@ class epoller(object): ep = select.epoll() try: with self.lock: - for fd, (ob, evs) in self.registered.items(): - ep.register(fd, evs) + try: + for fd, (ob, evs) in self.registered.items(): + ep.register(fd, evs) + except: + self.registered.clear() + raise self.ep = ep while self.registered: