Skip to content

Commit

Permalink
Avoid prefixing already-prefixed ls output
Browse files Browse the repository at this point in the history
  • Loading branch information
mperry8889 authored and Matt Perry committed Nov 14, 2012
1 parent 282463f commit 5cb2e46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mrjob/fs/hadoop.py
Expand Up @@ -157,7 +157,7 @@ def ls(self, path_glob):
raise IOError("Could not locate path in string '%s'" % line)

path = ' '.join(fields[path_index:])
yield hdfs_prefix + path
yield (hdfs_prefix if not path.startswith(hdfs_prefix) else '') + path

def _cat_file(self, filename):
# stream from HDFS
Expand Down

0 comments on commit 5cb2e46

Please sign in to comment.