donate_cpu_lib.py: fixed Python error

This commit is contained in:
firewave 2020-06-15 22:12:22 +02:00
parent b36c85d8fd
commit fa7e687853
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ def get_cppcheck(cppcheck_path, work_path):
os.chdir(cppcheck_path) os.chdir(cppcheck_path)
try: try:
subprocess.check_call(['git', 'checkout', '-f', 'main']) subprocess.check_call(['git', 'checkout', '-f', 'main'])
except CalledProcessError: except subprocess.CalledProcessError:
subprocess.check_call(['git', 'checkout', '-f', 'master']) subprocess.check_call(['git', 'checkout', '-f', 'master'])
subprocess.check_call(['git', 'pull']) subprocess.check_call(['git', 'pull'])
subprocess.check_call(['git', 'checkout', 'origin/main', '-b', 'main']) subprocess.check_call(['git', 'checkout', 'origin/main', '-b', 'main'])