chore: fix pylint complains

This commit is contained in:
Sebastian Mark 2024-06-10 12:09:05 +02:00
parent 3d52b21442
commit 260ab2ba22
2 changed files with 14 additions and 8 deletions

View file

@ -1,3 +1,5 @@
# pylint: disable=missing-module-docstring
import logging as log
import subprocess
import sys
@ -32,7 +34,9 @@ def run_subprocess(command: str, workdir: str) -> bool:
bool: False if subprocess fails
"""
try:
log.debug(subprocess.run(command.split(" "), cwd=workdir, text=True))
log.debug(
subprocess.run(command.split(" "), cwd=workdir, text=True, check=False)
)
except subprocess.CalledProcessError:
return False
@ -62,7 +66,7 @@ def update_git_repo(repo_path: str, ignore_git_status: bool) -> bool:
try:
fetch_res = repo.remotes.origin.fetch()[0]
except git.exc.GitCommandError as e:
log.error("-> " + str(e))
log.error("-> %s ", str(e))
return False
# check for new commits
@ -72,9 +76,9 @@ def update_git_repo(repo_path: str, ignore_git_status: bool) -> bool:
# pull remote changes to local branch
try:
log.info("-> " + repo.git.pull())
log.info("-> %s", repo.git.pull())
except git.exc.GitCommandError as e:
log.error("-> " + str(e))
log.error("-> %s", str(e))
return False
return True