call _process_file on the actual file object instead of the path inside JSONSource

This commit is contained in:
Michael Stephens 2010-06-18 14:10:24 -04:00
parent 07d9725ce4
commit a08771b3b1

View File

@ -219,7 +219,7 @@ class FileSource(object):
yield record
elif isinstance(self._input, basestring):
with open(self._input) as f:
for record in self._process_file(input):
for record in self._process_file(f):
yield record
elif hasattr(self._input, '__iter__'):
for el in self._input: