Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Jun 28, 2024
1 parent 9a01cd7 commit cad285d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions metadata-ingestion/src/datahub/ingestion/fs/local_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ def list(self, path: str) -> Iterable[FileInfo]:
p = pathlib.Path(path)
if p.is_file():
return [self.file_status(path)]
elif p.is_dir():
return iter([self.file_status(str(x)) for x in p.iterdir()])
else:
raise Exception(f"Failed to process {path}")
return iter([self.file_status(str(x)) for x in p.iterdir()])

def file_status(self, path: str) -> FileInfo:
if os.path.isfile(path):
Expand Down

0 comments on commit cad285d

Please sign in to comment.