Skip to content

Commit

Permalink
[processing] fixed creating params and outputs from description strings
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Oct 17, 2016
1 parent 52a0082 commit 25d0351
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/core/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def _resolveTemporary(self, alg):

def getOutputFromString(s):
try:
if "|" in s:
if "|" in s and s.startswith("Output"):
tokens = s.split("|")
params = [t if str(t) != "None" else None for t in tokens[1:]]
clazz = getattr(sys.modules[__name__], tokens[0])
Expand Down
4 changes: 3 additions & 1 deletion python/plugins/processing/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ def setValue(self, value):

def getParameterFromString(s):
# Try the parameter definitions used in description files
if '|' in s:
if '|' in s and (s.startswith("Parameter") or s.startswith("*Parameter")):
isAdvanced = False
if s.startswith("*"):
s = s[1:]
Expand All @@ -1535,3 +1535,5 @@ def getParameterFromString(s):
return param
except AttributeError:
pass
except:
return None

0 comments on commit 25d0351

Please sign in to comment.