BugFix and error reporting
* Fix a bug if the macro path is invalid * reporting exeptions if somethings fail in the Draft core modules init
This commit is contained in:
parent
15406d1498
commit
9a2fab28d2
|
@ -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",
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user