Depend on lxml, and display a warning if it cannot be found.
This commit is contained in:
parent
a44e5143a3
commit
a6668a6873
|
@ -46,7 +46,12 @@ def getParamGroups(nameInConfig, nameInPath):
|
||||||
return recur(True, nameInPath, nameInPath, root)
|
return recur(True, nameInPath, nameInPath, root)
|
||||||
|
|
||||||
def getAllParams():
|
def getAllParams():
|
||||||
|
try:
|
||||||
|
from lxml import etree
|
||||||
return [getParamGroups('UserParameter', 'User parameter')]
|
return [getParamGroups('UserParameter', 'User parameter')]
|
||||||
|
except:
|
||||||
|
print('Could not load the list of all parameters. Please install the LXML python library with:\npython -m pip install --upgrade lxml')
|
||||||
|
return []
|
||||||
|
|
||||||
def paramGroupAction(nfo):
|
def paramGroupAction(nfo):
|
||||||
FreeCADGui.runCommand('Std_DlgParameter',0)
|
FreeCADGui.runCommand('Std_DlgParameter',0)
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<url type="bugtracker">https://github.com/SuzanneSoy/SearchBar/issues</url>
|
<url type="bugtracker">https://github.com/SuzanneSoy/SearchBar/issues</url>
|
||||||
<url type="documentation">https://github.com/SuzanneSoy/SearchBar</url>
|
<url type="documentation">https://github.com/SuzanneSoy/SearchBar</url>
|
||||||
<icon>Tango-System-search.svg</icon>
|
<icon>Tango-System-search.svg</icon>
|
||||||
|
<depend type="python">lxml</depend>
|
||||||
<content>
|
<content>
|
||||||
<workbench>
|
<workbench>
|
||||||
<name>SearchBar</name>
|
<name>SearchBar</name>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user