Skip to content

Commit

Permalink
debugging for new environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Aug 30, 2018
1 parent f4d47f9 commit 8ac1fc0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions karr_lab_build_utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2288,12 +2288,12 @@ def analyze_package(self, package_name, messages=None, config_filename=None, ver

report_opts = [
'--reports=n',
'--score=n',
'--score=n',
]
other_opts = []
if config_filename:
other_opts.append('--rcfile={}'.format(config_filename))
if verbose:
if verbose:
other_opts.append('--verbose')
return epylint.lint(package_name, msg_opts + report_opts + other_opts)

Expand Down Expand Up @@ -2477,8 +2477,15 @@ def download_package_config_files(self):
"""
# clone or update repo
if os.path.isdir(self.configs_repo_path):
repo = git.Repo(path=self.configs_repo_path)
repo.remotes['origin'].pull()
try:
repo = git.Repo(path=self.configs_repo_path)
repo.remotes['origin'].pull()
except InvalidGitRepositoryError:
temp_dir_name = tempfile.mkdtemp()
git.Repo.clone_from(self.configs_repo_url, temp_dir_name)
shutil.copytree_to_existing_destination(self.configs_repo_url, temp_dir_name)
shutil.rmtree(self.configs_repo_url)
os.rename(temp_dir_name, self.configs_repo_url)
else:
try:
git.Repo.clone_from(self.configs_repo_url, self.configs_repo_path)
Expand Down

0 comments on commit 8ac1fc0

Please sign in to comment.