mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] minor fixes related to settings
This commit is contained in:
parent
9aff0d7355
commit
b1570fb20a
@ -232,7 +232,7 @@ class GeoAlgorithm:
|
||||
self.runHookScript(scriptFile, progress)
|
||||
|
||||
def runHookScript(self, filename, progress):
|
||||
if not os.path.exists(filename):
|
||||
if filename is None or not os.path.exists(filename):
|
||||
return
|
||||
try:
|
||||
script = 'import processing\n'
|
||||
|
@ -26,7 +26,7 @@ __copyright__ = '(C) 2012, Victor Olaya'
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os.path
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4 import QtGui,QtCore
|
||||
from processing.tools.system import *
|
||||
|
||||
|
||||
@ -150,7 +150,10 @@ class ProcessingConfig:
|
||||
@staticmethod
|
||||
def getSetting(name):
|
||||
if name in ProcessingConfig.settings.keys():
|
||||
return ProcessingConfig.settings[name].value
|
||||
v = ProcessingConfig.settings[name].value
|
||||
if isinstance(v, QtCore.QPyNullVariant):
|
||||
v = None
|
||||
return v
|
||||
else:
|
||||
return None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user