import GitPython exceptions using public module to placate pylint

************* Module fdroidserver.nightly
fdroidserver/nightly.py:239:11: E1101: Instance of 'GitError' has no 'GitCommandError' member (no-member)
fdroidserver/nightly.py:239:11: E1101: Instance of 'Exception' has no 'GitCommandError' member (no-member)
This commit is contained in:
Hans-Christoph Steiner 2025-09-15 14:45:26 +02:00
parent 0a5f15dad7
commit 86be5be09d
2 changed files with 2 additions and 2 deletions

View file

@ -156,7 +156,7 @@ def main():
).git.describe(always=True, tags=True)
)
sys.exit(0)
except git.exc.InvalidGitRepositoryError:
except git.InvalidGitRepositoryError:
print(_('No version information could be found.'))
sys.exit(1)
else:

View file

@ -236,7 +236,7 @@ def clone_git_repo(clone_url, git_mirror_path):
'GIT_TERMINAL_PROMPT': '0',
},
)
except git.exc.GitCommandError as e:
except git.GitCommandError as e:
logging.warning(_('WARNING: only public git repos are supported!'))
raise VCSException(f'git clone {clone_url} failed:', str(e)) from e