summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-15 18:45:07 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-15 18:45:07 +0000
commit46da22f6de519fb48177b6194536b0704977bf5d (patch)
tree08913b7435bc23d155f0033b01062a2e73c9575d
parentUse a list comprehension instead of strange map() usage which yields odd (diff)
downloadportage-idfetch-46da22f6de519fb48177b6194536b0704977bf5d.tar.gz
portage-idfetch-46da22f6de519fb48177b6194536b0704977bf5d.tar.bz2
portage-idfetch-46da22f6de519fb48177b6194536b0704977bf5d.zip
For consistency, make get_open_fds() return a plain iterator in any case,
rather than return a list in some cases. svn path=/main/trunk/; revision=11418
-rw-r--r--pym/portage/process.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index 6a8a59ff..3bc6bd1a 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -21,8 +21,8 @@ except ImportError:
if os.path.isdir("/proc/%i/fd" % os.getpid()):
def get_open_fds():
- return [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)