diff --git a/src/Mod/Draft/InitGui.py b/src/Mod/Draft/InitGui.py index 103411279..90de93f68 100644 --- a/src/Mod/Draft/InitGui.py +++ b/src/Mod/Draft/InitGui.py @@ -100,8 +100,9 @@ class DraftWorkbench (Workbench): FreeCADGui.addLanguagePath(":/translations") FreeCADGui.addIconPath(":/icons") self.appendMenu(["&Macro",translate("draft","Installed Macros")],macros.macrosList) - except: - pass + except Exception as inst: + print inst + FreeCAD.Console.PrintError("Error: Initializing one or more of the Draft modules failed, Draft will not work as expected.\n") # setup menus self.cmdList = ["Draft_Line","Draft_Wire","Draft_Circle","Draft_Arc","Draft_Ellipse", diff --git a/src/Mod/Draft/macros.py b/src/Mod/Draft/macros.py index 2b106d19f..1b71af68d 100644 --- a/src/Mod/Draft/macros.py +++ b/src/Mod/Draft/macros.py @@ -40,7 +40,7 @@ class MacroCommand(): if os.path.exists(target): execfile(target) -if macroPath: +if macroPath and os.path.isdir(macroPath): macros = [] for f in os.listdir(macroPath): if ".FCMacro" in f: