From: Zac Medico Date: Fri, 15 Aug 2008 18:12:33 +0000 (-0000) Subject: Use a list comprehension instead of strange map() usage which yields odd X-Git-Tag: v2.2_rc9~84 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ba37d56edc4133d6c1f533afe59749cd2056eeb2;p=portage.git Use a list comprehension instead of strange map() usage which yields odd results when fed to the py3k converter. Thanks to René 'Necoro' Neumann. svn path=/main/trunk/; revision=11417 --- 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)