Skip to content

Commit

Permalink
[sextante]Fixed bug in pyculator algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Apr 11, 2013
1 parent 3d1e50c commit 3034a46
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions python/plugins/sextante/algs/FieldPyculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 3034a46

Please sign in to comment.