From ba37d56edc4133d6c1f533afe59749cd2056eeb2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 15 Aug 2008 18:12:33 +0000 Subject: =?UTF-8?q?Use=20a=20list=20comprehension=20instead=20of=20strange?= =?UTF-8?q?=20map()=20usage=20which=20yields=20odd=20results=20when=20fed?= =?UTF-8?q?=20to=20the=20py3k=20converter.=20Thanks=20to=20Ren=C3=A9=20'Ne?= =?UTF-8?q?coro'=20Neumann.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/main/trunk/; revision=11417 --- pym/portage/process.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pym/portage/process.py') diff --git a/pym/portage/process.py b/pym/portage/process.py index e9a1fab70..6a8a59ff7 100644 --- a/pym/portage/process.py +++ b/pym/portage/process.py @@ -21,7 +21,8 @@ except ImportError: if os.path.isdir("/proc/%i/fd" % os.getpid()): def get_open_fds(): - return map(int, [fd for fd in os.listdir("/proc/%i/fd" % os.getpid()) if fd.isdigit()]) + return [int(fd) for fd in os.listdir("/proc/%i/fd" % os.getpid()) \ + if fd.isdigit()] else: def get_open_fds(): return xrange(max_fd_limit) -- cgit v1.2.3-1-g7c22