From 40d6827517816487e5711634dc2eed566ebdcaf9 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 15 Dec 2015 14:05:03 -0200 Subject: [PATCH] Allow the macro to work without git - fixes #137 --- PartsLibrary.FCMacro | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PartsLibrary.FCMacro b/PartsLibrary.FCMacro index dcff1eab..235bbc4b 100644 --- a/PartsLibrary.FCMacro +++ b/PartsLibrary.FCMacro @@ -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)