Skip to content

Commit b1570fb

Browse files
committedMay 10, 2014
[processing] minor fixes related to settings
1 parent 9aff0d7 commit b1570fb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
 

‎python/plugins/processing/core/GeoAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def runPreExecutionScript(self, progress):
232232
self.runHookScript(scriptFile, progress)
233233

234234
def runHookScript(self, filename, progress):
235-
if not os.path.exists(filename):
235+
if filename is None or not os.path.exists(filename):
236236
return
237237
try:
238238
script = 'import processing\n'

‎python/plugins/processing/core/ProcessingConfig.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
__revision__ = '$Format:%H$'
2727

2828
import os.path
29-
from PyQt4 import QtGui
29+
from PyQt4 import QtGui,QtCore
3030
from processing.tools.system import *
3131

3232

@@ -150,7 +150,10 @@ def readSettings():
150150
@staticmethod
151151
def getSetting(name):
152152
if name in ProcessingConfig.settings.keys():
153-
return ProcessingConfig.settings[name].value
153+
v = ProcessingConfig.settings[name].value
154+
if isinstance(v, QtCore.QPyNullVariant):
155+
v = None
156+
return v
154157
else:
155158
return None
156159

0 commit comments

Comments
 (0)
Please sign in to comment.