Skip to content

Commit

Permalink
[processing] fixed error when running script algorithm from script ed…
Browse files Browse the repository at this point in the history
…itor (fixes #9905)
  • Loading branch information
volaya committed Mar 27, 2014
1 parent e63b75c commit 6f3046c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 0 additions & 5 deletions python/plugins/processing/gui/ScriptEditorDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions python/plugins/processing/script/ScriptAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 + '"'
)

Expand All @@ -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 + '"'
)

Expand All @@ -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()
Expand Down

0 comments on commit 6f3046c

Please sign in to comment.