AddonManager: Handles git module with no Repo attribute - Fixes #4072

This commit is contained in:
Yorik van Havre
2021-08-18 11:32:19 +02:00
parent 5ff2d7e981
commit 88744fcf52

View File

@@ -40,7 +40,8 @@ from addonmanager_macro import Macro
have_git = False
try:
import git
have_git = True
# some versions of git module have no "Repo" class?? Bug #4072 module 'git' has no attribute 'Repo'
have_git = hasattr(git,"Repo")
except ImportError:
pass