Permalink
Browse files

fix another bug introduced by cat optimization

  • Loading branch information...
klbostee committed Jul 26, 2010
1 parent 3b77a9e commit d7719445b8ad22a83f2cff4fb5de8c5447a3f643
Showing with 2 additions and 3 deletions.
  1. +2 −3 dumbo/backends/streaming.py
@@ -224,13 +224,12 @@ 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]
+ lineparts = (line.split()[-1] for line in ls)
+ subpaths = [part for part in lineparts if part.startswith("/")]
ls.close()
else:
subpaths = [path]
for subpath in subpaths:
- if not subpath.startswith("/"):
- continue
dumptb = os.popen('%s %s/bin/hadoop jar %s dumptb %s 2> /dev/null'
% (hadenv, self.hadoop, streamingjar, subpath))
ascodeopt = getopt(opts, 'ascode')

0 comments on commit d771944

Please sign in to comment.