update catch git error

This commit is contained in:
wl-zhao
2024-10-20 09:21:54 +08:00
parent f1bf4485c1
commit 62ab265a80
+2 -2
View File
@@ -63,7 +63,7 @@ def inspect_repo_version(module_path):
['git', 'config', '--get', 'remote.origin.url'],
cwd=module_path
).strip().decode()
except subprocess.CalledProcessError:
except Exception:
return result
# Get the latest commit hash
@@ -72,7 +72,7 @@ def inspect_repo_version(module_path):
['git', 'rev-parse', 'HEAD'],
cwd=module_path
).strip().decode()
except subprocess.CalledProcessError:
except Exception:
return result
# Create and return the JSON result