From: Markus Lehtonen Date: Fri, 30 May 2014 10:52:57 +0000 (+0300) Subject: CachedRepo: remove redundant initialization code X-Git-Tag: submit/devel/20190730.075437~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8a5c1fa77dd7ad2219267552afb77d482e8b5ad;p=services%2Fobs-service-git-buildpackage.git CachedRepo: remove redundant initialization code Remove the creation of repo parent directory in _init_git_repo(). The parent directory is created in _init_cache_dir() - with proper error handling. Change-Id: I840b0166b6f7463e7119a43edf68507419322f89 Signed-off-by: Markus Lehtonen --- diff --git a/gbp_repocache/__init__.py b/gbp_repocache/__init__.py index df201c6..3fd74c5 100644 --- a/gbp_repocache/__init__.py +++ b/gbp_repocache/__init__.py @@ -233,9 +233,6 @@ class CachedRepo(object): def _init_git_repo(self, url, bare): """Clone / update a remote git repository""" LOGGER.debug('Caching %s in %s', url, self._repodir) - # Create subdir, if it doesn't exist - if not os.path.exists(os.path.dirname(self._repodir)): - os.makedirs(os.path.dirname(self._repodir)) # Acquire repository lock self._acquire_lock(self._repodir)