Allow the macro to work without git - fixes #137
This commit is contained in:
parent
88db2acb7d
commit
40d6827517
1 changed files with 8 additions and 8 deletions
|
@ -191,14 +191,14 @@ class ExpDockWidget(QtGui.QDockWidget):
|
|||
import git
|
||||
except:
|
||||
FreeCAD.Console.PrintWarning("python-git not found. Git-related functions are disabled\n")
|
||||
try:
|
||||
repo = git.Repo(LIBRARYPATH)
|
||||
except:
|
||||
FreeCAD.Console.PrintError("Your library is not a valid Git repository. Please clone it with git first.\n")
|
||||
return
|
||||
if not repo.remotes:
|
||||
FreeCAD.Console.PrintWarning("No remote repository set.\n")
|
||||
return
|
||||
else:
|
||||
try:
|
||||
repo = git.Repo(LIBRARYPATH)
|
||||
except:
|
||||
FreeCAD.Console.PrintError("Your library is not a valid Git repository. Please clone it with git first.\n")
|
||||
else:
|
||||
if not repo.remotes:
|
||||
FreeCAD.Console.PrintWarning("No remote repository set.\n")
|
||||
if not repo:
|
||||
updatebutton.setEnabled(False)
|
||||
configbutton.setEnabled(False)
|
||||
|
|
Loading…
Add table
Reference in a new issue