summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-15 18:12:33 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-15 18:12:33 +0000
commitba37d56edc4133d6c1f533afe59749cd2056eeb2 (patch)
treef6f8cb3246c5df19a513c68264f978995797362f
parent2c3c5aeb95cb0c94fb74f9d482c5b194b887f4e7 (diff)
downloadportage-ba37d56edc4133d6c1f533afe59749cd2056eeb2.tar.gz
portage-ba37d56edc4133d6c1f533afe59749cd2056eeb2.tar.bz2
portage-ba37d56edc4133d6c1f533afe59749cd2056eeb2.zip
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
-rw-r--r--pym/portage/process.py3
1 files changed, 2 insertions, 1 deletions
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)