Skip to content

Commit

Permalink
Simplify & flush
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Aug 29, 2018
1 parent 5e8f22b commit 19e3b8a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scc/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,13 +1060,12 @@ def register_submodules(self):
directory in self.repository_config["submodules"]:
repository_config = \
self.repository_config["submodules"][directory]
# TODO: Unclear if this is needed
with self.cd(self.path):
submodule_repo = \
self.gh.git_repo(directory,
repository_config=repository_config)
self.submodules.append(submodule_repo)
submodule_repo.register_submodules()

submodule_repo = \
self.gh.git_repo(directory,
repository_config=repository_config)
self.submodules.append(submodule_repo)
submodule_repo.register_submodules()

def cd(self, directory):
class DirectoryChanger(object):
Expand Down Expand Up @@ -1137,6 +1136,7 @@ def wrap_call(self, logWrap, *command, **kwargs):
no_wait = False

self.dbg("Calling '%s'" % " ".join(command))
self.log.flush()
p = subprocess.Popen(command, cwd=self.path, **kwargs)
if not no_wait:
rc = p.wait()
Expand Down

0 comments on commit 19e3b8a

Please sign in to comment.