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
|
import git
|
||||||
except:
|
except:
|
||||||
FreeCAD.Console.PrintWarning("python-git not found. Git-related functions are disabled\n")
|
FreeCAD.Console.PrintWarning("python-git not found. Git-related functions are disabled\n")
|
||||||
try:
|
else:
|
||||||
repo = git.Repo(LIBRARYPATH)
|
try:
|
||||||
except:
|
repo = git.Repo(LIBRARYPATH)
|
||||||
FreeCAD.Console.PrintError("Your library is not a valid Git repository. Please clone it with git first.\n")
|
except:
|
||||||
return
|
FreeCAD.Console.PrintError("Your library is not a valid Git repository. Please clone it with git first.\n")
|
||||||
if not repo.remotes:
|
else:
|
||||||
FreeCAD.Console.PrintWarning("No remote repository set.\n")
|
if not repo.remotes:
|
||||||
return
|
FreeCAD.Console.PrintWarning("No remote repository set.\n")
|
||||||
if not repo:
|
if not repo:
|
||||||
updatebutton.setEnabled(False)
|
updatebutton.setEnabled(False)
|
||||||
configbutton.setEnabled(False)
|
configbutton.setEnabled(False)
|
||||||
|
|
Loading…
Add table
Reference in a new issue