Skip to content
Permalink
Browse files

[processing] minor fixes

  • Loading branch information
volaya committed Sep 24, 2013
1 parent 2b61f79 commit 983066a9f820e0c13cf2fb4932f19e2fa528fbb4
@@ -80,7 +80,7 @@ def addProvider(provider, updateList = False):
Processing.updateAlgsList()
except:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, "Could not load provider:"
+ provider.getDescription() + "\n" + sys.exc_info()[0])
+ provider.getDescription() + "\n" + unicode(sys.exc_info()[1]))
Processing.removeProvider(provider)

@staticmethod
@@ -118,9 +118,9 @@ def loadSettings():
if tokens[0] in ProcessingConfig.settings.keys():
setting = ProcessingConfig.settings[tokens[0]]
if isinstance(setting.value, bool):
setting.value = (tokens[1].strip() == str(True))
setting.value = (tokens[1].strip("\n\r ") == str(True))
else:
setting.value = tokens[1]
setting.value = tokens[1].strip("\n\r ")
ProcessingConfig.addSetting(setting)
line = lines.readline().strip("\n")
lines.close()
@@ -24,10 +24,8 @@
__revision__ = '$Format:%H$'

from PyQt4.QtGui import *

from processing.gui.ToolboxAction import ToolboxAction
from processing.gui.ScriptEditorDialog import ScriptEditorDialog

import processing.resources_rc

class CreateNewScriptAction(ToolboxAction):
@@ -42,16 +40,16 @@ def __init__(self, actionName, scriptType):

def getIcon(self):
if self.scriptType == self.SCRIPT_PYTHON:
return QIcon(":/sextante/images/script.png")
return QIcon(":/processing/images/script.png")
elif self.scriptType == self.SCRIPT_R:
return QIcon(":/sextante/images/r.png")
return QIcon(":/processing/images/r.png")

def execute(self):
dlg = None
if self.scriptType == self.SCRIPT_PYTHON:
dlg = ScriptEditorDialog(ScriptEditorDialog.SCRIPT_PYTHON, None)
dlg = ScriptEditorDialog(ScriptEditorDialog.SCRIPT_PYTHON, None)
if self.scriptType == self.SCRIPT_R:
dlg = ScriptEditorDialog(ScriptEditorDialog.SCRIPT_R, None)
dlg = ScriptEditorDialog(ScriptEditorDialog.SCRIPT_R, None)
dlg.exec_()
if dlg.update:
self.toolbox.updateTree()
@@ -27,21 +27,16 @@

from PyQt4.QtCore import *
from PyQt4.QtGui import *

from processing.core.ProcessingConfig import ProcessingConfig, Setting
from processing.core.ProcessingLog import ProcessingLog
from processing.core.AlgorithmProvider import AlgorithmProvider

from processing.gui.EditScriptAction import EditScriptAction
from processing.gui.DeleteScriptAction import DeleteScriptAction
from processing.gui.CreateNewScriptAction import CreateNewScriptAction

from processing.r.RUtils import RUtils
from processing.r.RAlgorithm import RAlgorithm

from processing.script.WrongScriptException import WrongScriptException
from processing.tools.system import *

import processing.resources_rc

class RAlgorithmProvider(AlgorithmProvider):
@@ -95,9 +90,9 @@ def loadFromFolder(self, folder):
if alg.name.strip() != "":
self.algs.append(alg)
except WrongScriptException, e:
ProcessingLog.addToLog(SextanteLog.LOG_ERROR, e.msg)
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, e.msg)
except Exception, e:
ProcessingLog.addToLog(SextanteLog.LOG_ERROR, "Could not load R script:" + descriptionFile + "\n" + unicode(e))
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, "Could not load R script:" + descriptionFile + "\n" + unicode(e))



0 comments on commit 983066a

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