[AddonManager] Improve Non GitPython Error..

...Handling. Previous output when clicking Macros tab caused errors in Report View with no Macros loaded at all.
This commit is contained in:
Syres916
2019-12-13 11:31:40 +00:00
committed by Yorik van Havre
parent ed8ba392c2
commit 2ff80fa47b

View File

@@ -271,7 +271,10 @@ class FillMacroListWorker(QtCore.QThread):
return
self.info_label_signal.emit('Downloading list of macros from git...')
git.Repo.clone_from('https://github.com/FreeCAD/FreeCAD-macros.git', self.repo_dir)
try:
git.Repo.clone_from('https://github.com/FreeCAD/FreeCAD-macros.git', self.repo_dir)
except:
FreeCAD.Console.PrintWarning(translate('AddonsInstaller', 'Something went wrong with the Git Macro Retieval, possibly the Git executable is not in the path')+"\n")
for dirpath, _, filenames in os.walk(self.repo_dir):
if '.git' in dirpath:
continue