Skip to content
Permalink
Browse files

[sextante]Fixed bug in pyculator algorithm

  • Loading branch information
volaya committed Apr 11, 2013
1 parent 3d1e50c commit 3034a46f40f28496fe87cb640198fea943d815a1
Showing with 2 additions and 12 deletions.
  1. +2 −12 python/plugins/sextante/algs/FieldPyculator.py
@@ -122,8 +122,8 @@ def processAlgorithm(self, progress):
bytecode = compile(code, '<string>', 'exec')
except:
raise GeoAlgorithmExecutionException("FieldPyculator code execute error\n"+
"Field code block can't be executed! %s \n %s"
(unicode(sys.exc_info()[0].__name__), unicode(sys.exc_info()[1])))
"Field code block can't be executed! %s \n %s",
unicode(sys.exc_info()[0].__name__), unicode(sys.exc_info()[1]))

#run
features = QGisLayers.features(layer)
@@ -151,17 +151,7 @@ def processAlgorithm(self, progress):
del new_ns[self.RESULT_VAR_NAME]

#exec
#try:
exec bytecode in new_ns
#except:
# raise e
#===============================================================
# GeoAlgorithmExecutionException("FieldPyculator code execute error\n"+
# "Field code block can't be executed for feature %s\n%s\n%s" %
# (unicode(sys.exc_info()[0].__name__),
# unicode(sys.exc_info()[1]),
# unicode(feat_id)))
#===============================================================

#check result
if not new_ns.has_key(self.RESULT_VAR_NAME):

0 comments on commit 3034a46

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