Skip to content

Commit

Permalink
A fix to use communication instead of wait. (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Di Natale authored Oct 14, 2020
1 parent 4cadf37 commit fb833b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions maestrowf/datastructures/environment/gitdependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ def acquire(self, substitutions=None):

logger.info("Checking for connectivity to '%s'", self.url)
p = start_process(["git", "ls-remote", self.url], shell=False)
retcode = p.wait()
if retcode != 0:
p.communicate()
if p.returncode != 0:
msg = "Connectivity check failed. Check that you have " \
"permissions to the specified repository, that the URL is " \
"correct, and that you have network connectivity. (url = {})" \
Expand All @@ -170,8 +170,8 @@ def acquire(self, substitutions=None):

logger.info("Cloning '%s' from '%s'...", self.name, self.url)
clone = start_process(["git", "clone", self.url, path], shell=False)
retcode = clone.wait()
if retcode != 0:
clone.communicate()
if clone.returncode != 0:
msg = "Failed to acquire GitDependency named '{}'. Check " \
"that repository URL ({}) and repository local path ({}) " \
"are valid.".format(self.name, self.url, path)
Expand Down

0 comments on commit fb833b4

Please sign in to comment.