Skip to content

Commit

Permalink
chore(python): simplify to yield from (#5055)
Browse files Browse the repository at this point in the history
Python 3 style is simpler.
  • Loading branch information
Rotzbua committed Mar 22, 2024
1 parent 23d5bb9 commit b6d75ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/git-archive-all.py
Expand Up @@ -308,8 +308,7 @@ def list_files(self, repo_path=''):
for submodule_path in self.read_shell("git submodule --quiet foreach 'pwd'", repo_abspath).splitlines():
# In order to get output path we need to exclude repository path from submodule_path.
submodule_path = path.relpath(submodule_path, self.main_repo_abspath)
for file_path in self.list_files(submodule_path):
yield file_path
yield from self.list_files(submodule_path)

@staticmethod
def run_shell(cmd, cwd=None):
Expand Down

0 comments on commit b6d75ed

Please sign in to comment.