Skip to content

Commit

Permalink
Catch OSError exception for cloning step.
Browse files Browse the repository at this point in the history
  • Loading branch information
cclerget committed Oct 31, 2014
1 parent 850de1f commit 80ca02a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion easybuild/tools/repository/gitrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def create_working_copy(self):
client.clone(self.repo)
reponame = os.listdir(self.wc)[0]
self.log.debug("rep name is %s" % reponame)
except git.GitCommandError, err:
except (git.GitCommandError, OSError), err:
# it might already have existed
self.log.warning("Git local repo initialization failed, it might already exist: %s" % err)

Expand Down
2 changes: 1 addition & 1 deletion easybuild/tools/repository/hgrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def create_working_copy(self):
try:
client = hglib.clone(self.repo, self.wc)
self.log.debug("repo %s cloned in %s" % (self.repo, self.wc))
except HgCommandError, err:
except (HgCommandError, OSError), err:
# it might already have existed
self.log.warning("Mercurial local repo initialization failed, it might already exist: %s" % err)

Expand Down

0 comments on commit 80ca02a

Please sign in to comment.