mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
[processing] fixed creating params and outputs from description strings
This commit is contained in:
parent
52a0082ade
commit
25d0351d57
@ -396,7 +396,7 @@ class OutputVector(Output):
|
|||||||
|
|
||||||
def getOutputFromString(s):
|
def getOutputFromString(s):
|
||||||
try:
|
try:
|
||||||
if "|" in s:
|
if "|" in s and s.startswith("Output"):
|
||||||
tokens = s.split("|")
|
tokens = s.split("|")
|
||||||
params = [t if str(t) != "None" else None for t in tokens[1:]]
|
params = [t if str(t) != "None" else None for t in tokens[1:]]
|
||||||
clazz = getattr(sys.modules[__name__], tokens[0])
|
clazz = getattr(sys.modules[__name__], tokens[0])
|
||||||
|
@ -1513,7 +1513,7 @@ paramClasses = [c for c in list(sys.modules[__name__].__dict__.values()) if iscl
|
|||||||
|
|
||||||
def getParameterFromString(s):
|
def getParameterFromString(s):
|
||||||
# Try the parameter definitions used in description files
|
# Try the parameter definitions used in description files
|
||||||
if '|' in s:
|
if '|' in s and (s.startswith("Parameter") or s.startswith("*Parameter")):
|
||||||
isAdvanced = False
|
isAdvanced = False
|
||||||
if s.startswith("*"):
|
if s.startswith("*"):
|
||||||
s = s[1:]
|
s = s[1:]
|
||||||
@ -1535,3 +1535,5 @@ def getParameterFromString(s):
|
|||||||
return param
|
return param
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user