fix exception

This commit is contained in:
Jabasukuriputo Wang 2023-08-01 11:26:17 +08:00 committed by GitHub
parent 955542a654
commit c46525b70b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ def git_clone(url, dir, name, commithash=None):
current_hash = subprocess.check_output([git, "-C", dir, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip() current_hash = subprocess.check_output([git, "-C", dir, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip()
if current_hash == commithash: if current_hash == commithash:
return return
except RuntimeError: except Exception:
print(f"Unable to determine {name}'s hash, attempting autofix...") print(f"Unable to determine {name}'s hash, attempting autofix...")
git_fix_workspace(dir) git_fix_workspace(dir)
current_hash = subprocess.check_output([git, "-C", dir, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip() current_hash = subprocess.check_output([git, "-C", dir, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip()