Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_eventloop/
Date: Sat, 26 May 2018 20:22:46
Message-Id: 1527366006.4fb5ef2ce2cb27ae155a25bfa5a4666597afb6ac.zmedico@gentoo
1 commit: 4fb5ef2ce2cb27ae155a25bfa5a4666597afb6ac
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 26 20:20:06 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat May 26 20:20:06 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4fb5ef2c
7
8 EventLoop.close: fix 'AttributeError: close' for python2
9
10 For python2 without epoll, fix handling of missing
11 'close' attribute on self._poll_obj.
12
13 Fixes: 4095be74985c ("Add ForkExecutor (bug 649588)")
14 Reported-by: Brian Evans <grknight <AT> gentoo.org>
15
16 pym/portage/util/_eventloop/EventLoop.py | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py
20 index de0795224..df76374d9 100644
21 --- a/pym/portage/util/_eventloop/EventLoop.py
22 +++ b/pym/portage/util/_eventloop/EventLoop.py
23 @@ -968,7 +968,7 @@ class EventLoop(object):
24 executor.shutdown(wait=True)
25
26 if self._poll_obj is not None:
27 - close = getattr(self._poll_obj, 'close')
28 + close = getattr(self._poll_obj, 'close', None)
29 if close is not None:
30 close()
31 self._poll_obj = None