Permalink
Browse files

fix bug introduced by previous commit

  • Loading branch information...
1 parent 46b92b0 commit 3b77a9eb529a189b6dc4ac849e8bfe0e5849319b @klbostee committed Jul 26, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 dumbo/backends/streaming.py
@@ -224,7 +224,8 @@ def cat(self, path, opts):
# cat each file separately when the path contains special chars
ls = os.popen('%s %s/bin/hadoop dfs -ls %s' % \
(hadenv, self.hadoop, path))
- subpaths = (line.split()[-1] for line in ls)
+ subpaths = [line.split()[-1] for line in ls]
+ ls.close()
else:
subpaths = [path]
for subpath in subpaths:
@@ -240,7 +241,6 @@ def cat(self, path, opts):
for output in outputs:
print '\t'.join(output)
dumptb.close()
- ls.close()
except IOError:
pass # ignore
return 0

0 comments on commit 3b77a9e

Please sign in to comment.