Skip to content
Permalink
Browse files

[processing] fixed error when running script algorithm from script ed…

…itor (fixes #9905)
  • Loading branch information
volaya committed Mar 27, 2014
1 parent e63b75c commit 6f3046caf1dbd2174ba3d9cb7163c5384f2037e2
@@ -36,18 +36,13 @@
from qgis.core import *

from processing import interface

from processing.gui.ParametersDialog import ParametersDialog
from processing.gui.HelpEditionDialog import HelpEditionDialog
from processing.gui.ScriptEdit import ScriptEdit

from processing.modeler.Providers import Providers

from processing.r.RAlgorithm import RAlgorithm
from processing.r.RUtils import RUtils
from processing.script.ScriptAlgorithm import ScriptAlgorithm
from processing.script.ScriptUtils import ScriptUtils

from processing.ui.ui_DlgScriptEditor import Ui_DlgScriptEditor

import processing.resources_rc
@@ -26,7 +26,6 @@
__revision__ = '$Format:%H$'

import os
import sys
from PyQt4 import QtGui
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.gui.Help2Html import Help2Html
@@ -218,7 +217,7 @@ def processParameterLine(self, line):
self.addOutput(out)
else:
raise WrongScriptException('Could not load script:'
+ self.descriptionFile
+ self.descriptionFile or ''
+ '.\n Problem with line "' + line + '"'
)

@@ -234,7 +233,7 @@ def processDescriptionParameterLine(self, line):
self.addOutput(OutputFactory.getFromString(line))
except Exception:
raise WrongScriptException('Could not load script:'
+ self.descriptionFile
+ self.descriptionFile or ''
+ '.\n Problem with line "' + line + '"'
)

@@ -257,6 +256,8 @@ def processAlgorithm(self, progress):
out.setValue(ns[out.name])

def helpFile(self):
if self.descriptionFile is None:
return None
helpfile = self.descriptionFile + '.help'
if os.path.exists(helpfile):
h2h = Help2Html()

0 comments on commit 6f3046c

Please sign in to comment.
You can’t perform that action at this time.